{"cve":"CVE-2024-27287","nvd":{"published":"2024-03-06T19:15:07.723","modified":"2026-06-17T07:19:34.750","status":"Analyzed","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.\nIn 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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7},"cwes":["CWE-79"],"references":["https://github.com/esphome/esphome/commit/37d2b3c7977a4ccbec59726ca7549cb776661455","https://github.com/esphome/esphome/security/advisories/GHSA-9p43-hj5j-96h5","https://github.com/esphome/esphome/commit/37d2b3c7977a4ccbec59726ca7549cb776661455","https://github.com/esphome/esphome/security/advisories/GHSA-9p43-hj5j-96h5"],"products":["esphome:esphome"],"source":"nvd","synced_at":"2026-10-19T21:46:54.846886191+00:00"},"epss":{"cve":"CVE-2024-27287","score":0.00681,"percentile":0.5247,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-9p43-hj5j-96h5","url":"https://osv.dev/vulnerability/GHSA-9p43-hj5j-96h5","summary":"esphome vulnerable to stored Cross-site Scripting in edit configuration file API","modified":"2026-07-07T17:57:03.701022430Z","packages":[{"ecosystem":"PyPI","name":"esphome","purl":"pkg:pypi/esphome","ranges":[">=2023.12.9 <2024.2.2"],"fixed":["2024.2.2"]}]},{"id":"PYSEC-2026-1329","url":"https://osv.dev/vulnerability/PYSEC-2026-1329","summary":"esphome vulnerable to stored Cross-site Scripting in edit configuration file API","modified":"2026-07-07T17:46:44.722327169Z","packages":[{"ecosystem":"PyPI","name":"esphome","purl":"pkg:pypi/esphome","ranges":[">=2023.12.9 <2024.2.2"],"fixed":["2024.2.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}