# CVE-2021-41104: Basic auth bypass in esphome

Source: https://junglewise.ai/threats/cve-2021-41104-basic-auth-bypass-in-esphome  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-09-28  
License: CC BY 4.0 with a link back

CVE-2021-41104 · Severity: low · CVSS 3.1 · Published 2021-09-28

ESPHome is a system to control the ESP8266/ESP32. Anyone with web_server enabled and HTTP basic auth configured on version 2021.9.1 or older is vulnerable to an issue in which `web_server` allows over-the-air (OTA) updates without checking user defined basic auth username & password. This issue is patched in version 2021.9.2. As a workaround, one may disable or remove `web_server`.

Technologies: [esphome (PyPI)](https://junglewise.ai/threats/technologies/pypi-esphome). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2021-41104 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-41104 being exploited in the wild.

**How severe is CVE-2021-41104?** Low severity, with a CVSS score of 3.1, published 28 September 2021.

**Which products and versions are affected?** esphome (PyPI) ECOSYSTEM:introduced=0,fixed=2021.9.2, GIT:introduced=0,fixed=2234f6aacf8cc653307fed80f3750317a82c4f83|ECOSYSTEM:introduced=0,fixed=2021.9.2.

**Is there a fix for CVE-2021-41104?** Yes. esphome (PyPI): upgrade to 2021.9.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-41104?** Check whether you run esphome (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- esphome (PyPI): upgrade to 2021.9.2 or later

  ```sh
  pip install "esphome>=2021.9.2"
  ```


## Affected products

- esphome (PyPI) ECOSYSTEM:introduced=0,fixed=2021.9.2, GIT:introduced=0,fixed=2234f6aacf8cc653307fed80f3750317a82c4f83|ECOSYSTEM:introduced=0,fixed=2021.9.2

## Identifiers

- CVE-2021-41104
- GHSA-48mj-p7x2-5jfm
- PYSEC-2021-351

## Related threats

- [PYSEC-2026-1326 - ESPHome vulnerable to denial-of-service via out-of-bounds check bypass in the API component](https://junglewise.ai/threats/cve-2026-23833-esphome-vulnerable-to-denial-of-service-via-out-of-bounds-check)
- [PYSEC-2026-1330 - ESP-IDF web_server basic auth bypass using empty or incomplete Authorization header](https://junglewise.ai/threats/cve-2025-57808-esp-idf-web-server-basic-auth-bypass-using-empty-or-incomplete)
- [PYSEC-2026-1327 - ESPHome vulnerable to Authentication bypass via Cross site request forgery](https://junglewise.ai/threats/cve-2024-29019-esphome-vulnerable-to-authentication-bypass-via-cross-site)
- [PYSEC-2026-1329 - esphome vulnerable to stored Cross-site Scripting in edit configuration file API](https://junglewise.ai/threats/cve-2024-27287-esphome-vulnerable-to-stored-cross-site-scripting-in-edit)
- [PYSEC-2026-1328 - ESPHome vulnerable to remote code execution via arbitrary file write](https://junglewise.ai/threats/cve-2024-27081-esphome-vulnerable-to-remote-code-execution-via-arbitrary-file)
