# CVE-2025-57808: ESP-IDF web_server basic auth bypass using empty or incomplete Authorization header

> Attackers can bypass authentication in ESPHome's web server by sending empty or partial Authorization headers, gaining unauthorized access to functionality including OTA updates.

- **Severity:** High 8.1 (`CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Sep 2025
- **Updated:** 2 Sep 2025
- **Also known as:** GHSA-mxh2-ccgj-8635, PYSEC-2026-1330

## What is CVE-2025-57808?

CVE-2025-57808 is a high-severity authentication bypass vulnerability in esphome, published on 2 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

Weakness: CWE-303 (Incorrect Implementation of Authentication Algorithm)

## Which versions are affected by CVE-2025-57808?

3 open source packages ship an affected version, including esphome. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `esphome` | PyPI | All versions | 2025.8.1 |
| `esphome` | PyPI | All versions | 2025.8.1 |
| `esphome` | PyPI | All versions | 2025.8.1 |

Products: Esphome Esphome Firmware.

## How do I fix CVE-2025-57808?

Upgrade esphome to 2025.8.1 or later.

## Is CVE-2025-57808 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-57808 exists.

Public exploit code:

- ESPHome - Authentication Bypass (nuclei): http/cves/2025/CVE-2025-57808.yaml

## Other vulnerabilities in esphome

- [CVE-2021-41104](https://insights.sbomify.com/CVE-2021-41104/): web_server allows OTA update without checking user defined basic auth username & password (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-57808 and fix it if it is affected.

What it is: CVE-2025-57808 is a high-severity authentication bypass vulnerability in esphome, published on 2 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-57808 exists.

Affected packages and fixed versions:
- esphome (PyPI): affected all versions; fixed in 2025.8.1
- esphome (PyPI): affected all versions; fixed in 2025.8.1
- esphome (PyPI): affected all versions; fixed in 2025.8.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-57808/ (Markdown: https://insights.sbomify.com/CVE-2025-57808/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-57808
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-57808
- OSV: https://osv.dev/vulnerability/CVE-2025-57808

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-57808/
Summaries are generated and may contain mistakes; the official description above is the record.
