Read the docs
TI-2024-18126 Aliases CVE-2024-27287GHSA-9p43-hj5j-96h5

ESPHome vulnerable to stored Cross-site Scripting in edit configuration file API

Priority MEDIUM 41CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00681 52nd percentileScored 2026-11-07
Fix Fixed esphome (esphome): 2024.2.2esphome (PyPI): 2024.2.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
esphomeesphome2023.12.9 to before 2024.2.22024.2.2Patch availableCNA
—esphome (PyPI)2023.12.9 to before 2024.2.22024.2.2Patch availableGHSA-9p43-hj5j-96h5
  • esphome Vendoresphome Affected 2023.12.9 to before 2024.2.2 Fixed in 2024.2.2 Patch available CNA
  • esphome (PyPI) Vendor— Affected 2023.12.9 to before 2024.2.2 Fixed in 2024.2.2 Patch available GHSA-9p43-hj5j-96h5

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:esphome:esphome:*:*:*:*:*:*:*:*2023.12.9 to before 2024.2.2Vulnerableesphome
  • cpe:2.3:a:esphome:esphome:*:*:*:*:*:*:*:* Versions 2023.12.9 to before 2024.2.2 Vulnerable ·esphome

Remediation

  • Fix · CNA esphome (esphome) Fixed in 2024.2.2
  • Fix · GHSA-9p43-hj5j-96h5 esphome (PyPI) Fixed in 2024.2.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-27287
  2. 2026-10-03 Alias added: GHSA-9p43-hj5j-96h5

References

  • TI-2024-17944 ESPHome remote code execution via arbitrary file write CVSS 3.1HIGH 8.8
  • TI-2026-19197 ESPHome vulnerable to denial-of-service via out-of-bounds check bypass in the API component CVSS 4.0LOW 1.7

Sources