CVE-2024-27287 in Esphome and 1 more product
ESPHome is a system to control your ESP8266/ESP32 for Home Automation systems. Starting in version 2023.12.9 and prior to version 2024.2.2, editing the configuration file API in dashboard component of ESPHome version 2023.12.9 (command line installation and Home Assistant add-on) serves unsanitized data with `Conten...
Affects 2 products from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, low privileges required, requires user interaction, can impact systems beyond the vulnerable component, full confidentiality impact, full integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Esphome | Esphome (device and firmware) | ≥ 2023.12.9, < 2024.2.2 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
ESPHome is a system to control your ESP8266/ESP32 for Home Automation systems. Starting in version 2023.12.9 and prior to version 2024.2.2, editing the configuration file API in dashboard component of ESPHome version 2023.12.9 (command line installation and Home Assistant add-on) serves unsanitized data with `Content-Type: text/html; charset=UTF-8`, allowing a remote authenticated user to inject arbitrary web script and exfiltrate session cookies via Cross-Site scripting. It is possible for a malicious authenticated user to inject arbitrary Javascript in configuration files using a POST request to the /edit endpoint, the configuration parameter allows to specify the file to write. To trigger the XSS vulnerability, the victim must visit the page` /edit?configuration=[xss file]`. Abusing this vulnerability a malicious actor could perform operations on the dashboard on the behalf of a logged user, access sensitive information, create, edit and delete configuration files and flash firmware on managed boards. In addition to this, cookies are not correctly secured, allowing the exfiltration of session cookie values. Version 2024.2.2 contains a patch for this issue.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-27287 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-051493-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| Published | 2024-03-06 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-79: Cross-Site Scripting (XSS)
Attacker injects malicious scripts into web pages viewed by other users, executing in the victim's browser context.
Related attack patterns (CAPEC)
CAPEC-85 AJAX Footprinting via CWE-79
CAPEC-209 XSS Using MIME Type Mismatch via CWE-79
CAPEC-588 DOM-Based XSS via CWE-79
CAPEC-591 Reflected XSS via CWE-79
CAPEC-592 Stored XSS via CWE-79
Show all 6
CAPEC-63 Cross-Site Scripting (XSS) via CWE-79
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2024-27287 affects ESPHome versions 2023.12.9 to 2024.2.1, allowing remote authenticated users to inject unsanitized data via the dashboard component's API, leading to potential Cross-Site Scripting (XSS) attacks.
The vulnerability arises from the improper handling of user input in the configuration file API of the dashboard component. When an authenticated user edits the configuration, unsanitized data is served with a `Content-Type: text/html; charset=UTF-8`, which can be exploited to inject malicious scripts.
Questions
What is CVE-2024-27287?
CVE-2024-27287 affects ESPHome versions 2023.12.9 to 2024.2.1, allowing remote authenticated users to inject unsanitized data via the dashboard component's API, leading to potential Cross-Site Scripting (XSS) attacks.
What is the CVSS score for CVE-2024-27287?
CVE-2024-27287 has CVSS 8.7 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N. EPSS: 0.9%.
Is CVE-2024-27287 actively exploited?
No confirmed active exploitation of CVE-2024-27287 as of 2026-09-25.
How do I remediate CVE-2024-27287?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2024-27287?
CVE-2024-27287 affects Esphome Esphome.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Esphome","product":"Esphome","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.