8.1high
ESP-IDF web_server basic auth bypass using empty or incomplete Authorization header
- Severity
- 8.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.55% (higher than 75% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mxh2-ccgj-8635PYSEC-2026-1330
Description
ESPHome is a system to control microcontrollers remotely through Home Automation systems. In version 2025.8.0 in the ESP-IDF platform, ESPHome's web_server authentication check can pass incorrectly when the client-supplied base64-encoded Authorization value is empty or is a substring of the correct value. This allows access to web_server functionality (including OTA, if enabled) without knowing any information about the correct username or password. This issue has been patched in version 2025.8.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| esphome esphome | = 2025.8.0 | CVE List |
| esphome (PyPI) | before 2025.8.1 | GitHub Advisory Database, PyPA Advisory Database |
| esphome esphome_firmware | 2025.8.0 | NVD |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| PyPA Advisory Database | 8.1high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
ESPHome is a system to control microcontrollers remotely through Home Automation systems. In version 2025.8.0 in the ESP-IDF platform, ESPHome's web_server authentication check can pass incorrectly when the client-supplied base64-encoded Authorization value is empty or is a substring of the correct value. This allows access to web_server functionality (including OTA, if enabled) without knowing any information about the correct username or password. This issue has been patched in version 2025.8.1.
GitHub Advisory Database
Summary
On the ESP-IDF platform, ESPHome's web_server authentication check can pass incorrectly when the client-supplied base64-encoded Authorization value is empty or is a substring of the correct value (e.g., correct username with partial password). This allows access to web_server functionality (including OTA, if enabled) without knowing any information about the correct username or password.
Details
The HTTP basic auth check in web_server_idf's AsyncWebServerRequest::authenticate only compares up to auth.value().size() - auth_prefix_len bytes of the base64-encoded user:pass string. This means a client-provided valuer like dXNlcjpz (user:s) will pass the check when the correct value is much longer, e.g., dXNlcjpzb21lcmVhbGx5bG9uZ3Bhc3M= (user:somereallylongpass).
Furthermore, the check will also pass when the supplied value is the empty string, which removes the need to know (or brute force) the username. A browser won't generally issue such a request, but it can easily be done by manually constructing the Authorizaztion request header (e.g., via curl).
PoC
Configure ESPHome as follows:
esp32:
board: ...
framework:
type: esp-idf
web_server:
auth:
username: user
password: somereallylongpass
In a browser, you can correctly log in by supplying username user and password somereallylongpass... but you can also incorrectly log in by supplying substrings of the password whose base64-encoded digest matches a prefix of the correct digest. (For example, I was able to log into an ESPHome device so configured by supplying password some... or even just s.)
You can also use a tool like curl to manually set an Authorization request header that always passes the check without any knowledge of the username:
$ curl -D- http://example.local/
HTTP/1.1 401 Unauthorized
...
$ curl -D- -H 'Authorization: Basic ' http://example.local/
HTTP/1.1 200 OK
...
Impact
This vulnerability effectively nullifies basic auth support for the ESP-IDF web_server, allowing auth bypass from another device on the local network with no knowledge of the correct username or password required.
Remediation
This vulnerability is fixed in 2025.8.1 and later.
For older versions, disabling the web_server component on ESP-IDF devices may be prudent, particularly if OTA updates through web_server are enabled.
NVD (es)
ESPHome es un sistema para controlar microcontroladores remotamente a través de sistemas de automatización del hogar. En la versión 2025.8.0 en la plataforma ESP-IDF, la comprobación de autenticación del web_server de ESPHome puede ser superada incorrectamente cuando el valor de autorización codificado en base64 proporcionado por el cliente está vacío o es una subcadena del valor correcto. Esto permite el acceso a la funcionalidad del web_server (incluyendo OTA, si está habilitado) sin conocer ninguna información sobre el nombre de usuario o la contraseña correctos. Este problema ha sido parcheado en la versión 2025.8.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-57808 changed 2025-09-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mxh2-ccgj-8635 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-57808 changed 2026-10-19 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1330 changed 2026-07-07 | CC-BY-4.0 |