Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS01OTI1LTg4eGgtNmg5Oc4AA6NN
ESPHome vulnerable to Authentication bypass via Cross site request forgery
Summary
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).
Details
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.
PoC
An example of malicious web page that abuses this vulnerability:
<script>
document.forms[0].submit();
</script>
<script>
</script>
In which an attacker creates and weaponizes "poc.yaml" config file containing a cookie exfiltration script and forces the payload triggering visiting the vulnerable page.
Example of such script:
Impact
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 (as seen in the PoC) to obtain a complete takeover of the user account.
Permalink: https://github.com/advisories/GHSA-5925-88xh-6h99JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01OTI1LTg4eGgtNmg5Oc4AA6NN
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 9 months ago
Updated: 7 months ago
CVSS Score: 8.1
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Identifiers: GHSA-5925-88xh-6h99, CVE-2024-29019
References:
- https://github.com/esphome/esphome/security/advisories/GHSA-5925-88xh-6h99
- https://github.com/advisories/GHSA-9p43-hj5j-96h5
- https://github.com/esphome/esphome/pull/6396
- https://github.com/esphome/esphome/pull/6397
- https://github.com/esphome/esphome/commit/c56c40cb824e34ed2b89ba1cb8a3a5eb31459c74
- https://github.com/esphome/esphome/releases/tag/2024.3.0
- https://nvd.nist.gov/vuln/detail/CVE-2024-29019
- https://github.com/advisories/GHSA-5925-88xh-6h99
Blast Radius: 14.2
Affected Packages
pypi:esphome
Dependent packages: 2Dependent repositories: 56
Downloads: 51,963 last month
Affected Version Ranges: >= 2023.12.9, < 2024.3.0
Fixed in: 2024.3.0
All affected versions: 2023.12.9, 2024.2.0, 2024.2.1, 2024.2.2
All unaffected versions: 1.10.1, 1.11.0, 1.11.1, 1.11.2, 1.12.0, 1.12.1, 1.12.2, 1.13.0, 1.13.1, 1.13.2, 1.13.3, 1.13.4, 1.13.5, 1.13.6, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.16.0, 1.16.1, 1.16.2, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 2021.8.0, 2021.8.1, 2021.8.2, 2021.9.0, 2021.9.1, 2021.9.2, 2021.9.3, 2021.10.0, 2021.10.1, 2021.10.2, 2021.10.3, 2021.11.0, 2021.11.1, 2021.11.2, 2021.11.3, 2021.11.4, 2021.12.0, 2021.12.1, 2021.12.2, 2021.12.3, 2022.1.0, 2022.1.1, 2022.1.2, 2022.1.3, 2022.1.4, 2022.2.0, 2022.2.1, 2022.2.2, 2022.2.3, 2022.2.4, 2022.2.5, 2022.2.6, 2022.3.0, 2022.3.1, 2022.3.2, 2022.4.0, 2022.5.0, 2022.5.1, 2022.6.0, 2022.6.1, 2022.6.2, 2022.6.3, 2022.8.0, 2022.8.1, 2022.8.2, 2022.8.3, 2022.9.0, 2022.9.1, 2022.9.2, 2022.9.3, 2022.9.4, 2022.10.0, 2022.10.1, 2022.10.2, 2022.11.0, 2022.11.1, 2022.11.2, 2022.11.3, 2022.11.4, 2022.11.5, 2022.12.0, 2022.12.1, 2022.12.2, 2022.12.3, 2022.12.4, 2022.12.5, 2022.12.6, 2022.12.7, 2022.12.8, 2023.2.0, 2023.2.1, 2023.2.2, 2023.2.3, 2023.2.4, 2023.3.0, 2023.3.1, 2023.3.2, 2023.4.0, 2023.4.1, 2023.4.2, 2023.4.3, 2023.4.4, 2023.5.0, 2023.5.1, 2023.5.2, 2023.5.3, 2023.5.4, 2023.5.5, 2023.6.0, 2023.6.1, 2023.6.2, 2023.6.3, 2023.6.4, 2023.6.5, 2023.7.0, 2023.7.1, 2023.8.0, 2023.8.1, 2023.8.2, 2023.8.3, 2023.9.0, 2023.9.1, 2023.9.2, 2023.9.3, 2023.10.0, 2023.10.1, 2023.10.2, 2023.10.3, 2023.10.4, 2023.10.5, 2023.10.6, 2023.11.0, 2023.11.1, 2023.11.2, 2023.11.3, 2023.11.4, 2023.11.5, 2023.11.6, 2023.12.0, 2023.12.1, 2023.12.2, 2023.12.3, 2023.12.4, 2023.12.5, 2023.12.6, 2023.12.7, 2023.12.8, 2024.3.0, 2024.3.1, 2024.3.2, 2024.4.0, 2024.4.1, 2024.4.2, 2024.5.0, 2024.5.1, 2024.5.2, 2024.5.3, 2024.5.4, 2024.5.5, 2024.6.0, 2024.6.1, 2024.6.2, 2024.6.3, 2024.6.4, 2024.6.5, 2024.6.6, 2024.7.0, 2024.7.1, 2024.7.2, 2024.7.3, 2024.8.0, 2024.8.1, 2024.8.2, 2024.8.3, 2024.9.0, 2024.9.1, 2024.9.2, 2024.10.0, 2024.10.1, 2024.10.2, 2024.10.3, 2024.11.0, 2024.11.1, 2024.11.2