CVE-2025-57808High· 8.1▾ MidnightPoC availableESP-IDF web_server basic auth bypass using empty or incomplete Authorization header
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 44.6 · likelihood 0.3 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 1 source. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Jul 8.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
1.5%
1.5% → 1.6%
Nuclei ×1
Last analysed / modified upstream
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.
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).
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
...
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.
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.
esphome < 2025.8.1Upgrade to a patched release:
esphome 2025.8.1Field changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2024-27287Medium· 6.5esphome vulnerable to stored Cross-site Scripting in edit configuration file API
CVE-2024-27081High· 7.2ESPHome vulnerable to remote code execution via arbitrary file write
CVE-2024-29019High· 8.1ESPHome vulnerable to Authentication bypass via Cross site request forgery
CVE-2026-23833MediumESPHome vulnerable to denial-of-service via out-of-bounds check bypass in the API component
CVE-2026-59178Critical· 9.8ESPHome Device Builder Dashboard is a dashboard for the ESPHome home management software