High severity · published Mar 6, 2024
CVE-2024-27287
ESPHome is a system to control your ESP8266/ESP32 for Home Automation systems
8.7
CVSS
0.7%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Confidentiality
High
Integrity
High
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.7% · higher than 52% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
ES
Esphome · Esphome
2023.12.9 before 2024.2.2 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-27287
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-27287
Patch
https://github.com/esphome/esphome/commit/37d2b3c7977a4ccbec59726ca7549cb776661455
Technical Description
https://github.com/esphome/esphome/security/advisories/GHSA-9p43-hj5j-96h5
More from Esphome
8.8
CVE-2024-27081
ESPHome is a system to control your ESP8266/ESP32
8.6
CVE-2026-71259
ESPHome external_components file:// Scheme Validation Bypass Leading to Remote Code Execution
8.1
CVE-2025-57808
ESP-IDF web_server basic auth bypass using empty or incomplete Authorization header
7.5
CVE-2026-23833
ESPHome vulnerable to denial-of-service via out-of-bounds check bypass in the API component
6.5
CVE-2026-71260
ESPHome web_server Plaintext Password Disclosure via JSON "value" Field
