VYPR
High severity8.1OSV Advisory· Published Apr 11, 2024· Updated Apr 15, 2026

CVE-2024-29019

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.

PackageAffected versionsPatched versions
esphomePyPI
>= 2023.12.9, < 2024.3.02024.3.0

Affected products

1

Patches

2
c56c40cb824e

Require xsrf/csrf when using a password (#6396)

https://github.com/esphome/esphomeJesse HillsMar 19, 2024via ghsa
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

News mentions

0

No linked articles in our index yet.