CVE-2024-29019
Description
ESPHome is a system to control microcontrollers remotely through Home Automation systems. API endpoints in dashboard component of ESPHome version 2023.12.9 (command line installation) are vulnerable to Cross-Site Request Forgery (CSRF) allowing remote attackers to carry out attacks against a logged user of the dashboard to perform operations on configuration files (create, edit, delete). It is possible for a malicious actor to create a specifically crafted web page that triggers a cross site request against ESPHome, this allows bypassing the authentication for API calls on the platform. This vulnerability allows bypassing authentication on API calls accessing configuration file operations on the behalf of a logged user. In order to trigger the vulnerability, the victim must visit a weaponized page. In addition to this, it is possible to chain this vulnerability with GHSA-9p43-hj5j-96h5/ CVE-2024-27287 to obtain a complete takeover of the user account. Version 2024.3.0 contains a patch for this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
esphomePyPI | >= 2023.12.9, < 2024.3.0 | 2024.3.0 |
Affected products
1Patches
2ce5a323f91bdc56c40cb824eRequire xsrf/csrf when using a password (#6396)
2 files changed · +7 −1
esphome/dashboard/web_server.py+6 −0 modified@@ -688,6 +688,11 @@ class MainRequestHandler(BaseHandler): @authenticated def get(self) -> None: begin = bool(self.get_argument("begin", False)) + if settings.using_password: + # Simply accessing the xsrf_token sets the cookie for us + self.xsrf_token # pylint: disable=pointless-statement + else: + self.clear_cookie("_xsrf") self.render( "index.template.html", @@ -1102,6 +1107,7 @@ def get_cache_time( "log_function": log_function, "websocket_ping_interval": 30.0, "template_path": get_base_frontend_path(), + "xsrf_cookies": settings.using_password, } rel = settings.relative_url return tornado.web.Application(
requirements.txt+1 −1 modified@@ -12,7 +12,7 @@ pyserial==3.5 platformio==6.1.13 # When updating platformio, also update Dockerfile esptool==4.7.0 click==8.1.7 -esphome-dashboard==20231107.0 +esphome-dashboard==20240319.0 aioesphomeapi==23.1.1 zeroconf==0.131.0 python-magic==0.4.27
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-5925-88xh-6h99ghsaADVISORY
- github.com/advisories/GHSA-9p43-hj5j-96h5nvdADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-29019ghsaADVISORY
- github.com/esphome/esphome/commit/c56c40cb824e34ed2b89ba1cb8a3a5eb31459c74ghsaWEB
- github.com/esphome/esphome/pull/6396ghsaWEB
- github.com/esphome/esphome/pull/6397ghsaWEB
- github.com/esphome/esphome/releases/tag/2024.3.0ghsaWEB
- github.com/esphome/esphome/security/advisories/GHSA-5925-88xh-6h99nvdWEB
News mentions
0No linked articles in our index yet.