{"answers":{"affected":"3 open source packages ship an affected version, including esphome. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-41104 in the wild and no public exploit code.","fix":"Upgrade esphome to 2021.9.2 or later.","what":"CVE-2021-41104 is a high-severity authentication bypass vulnerability in esphome, published on 28 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-41104 and fix it if it is affected.\n\nWhat it is: CVE-2021-41104 is a high-severity authentication bypass vulnerability in esphome, published on 28 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-41104 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- esphome (PyPI): affected all versions; fixed in 2021.9.2\n- esphome (PyPI): affected all versions; fixed in 2021.9.2\n- esphome (PyPI): affected all versions; fixed in 2021.9.2\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-41104/ (Markdown: https://insights.sbomify.com/CVE-2021-41104/index.md)","id":"CVE-2021-41104","markdown":"https://insights.sbomify.com/CVE-2021-41104/index.md","name":"CVE-2021-41104","record":{"aliases":["GHSA-48mj-p7x2-5jfm","PYSEC-2021-351"],"analysis":{"component_type":"iot_embedded","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"ESPHome firmware","requires_auth":"none","summary":"Attackers can perform unauthorized OTA updates on ESPHome devices with web_server enabled, bypassing configured HTTP basic authentication.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"esphome_firmware","vendor":"esphome"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"}],"description":"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 \u0026 password. This issue is patched in version 2021.9.2. As a workaround, one may disable or remove `web_server`.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"web_server allows OTA update without checking user defined basic auth username \u0026 password","id":"CVE-2021-41104","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"auth_bypass","year":"2021"},"n_packages":3,"n_references":3,"next":{"headline":"FreeSWITCH susceptible to Denial of Service via invalid SRTP packets","id":"CVE-2021-41105"},"packages":[{"ecosystem":"PyPI","fixed":["2021.9.2"],"introduced":["0"],"last_affected":[],"package":"esphome","purl":null,"source":"GHSA-48mj-p7x2-5jfm"},{"ecosystem":"PyPI","fixed":["2021.9.2"],"introduced":["0"],"last_affected":[],"package":"esphome","purl":"pkg:pypi/esphome","source":"GHSA-48mj-p7x2-5jfm"},{"ecosystem":"PyPI","fixed":["2021.9.2"],"introduced":["0"],"last_affected":[],"package":"esphome","purl":"pkg:pypi/esphome","source":"PYSEC-2021-351"}],"prev":{"headline":"Insufficiently restricted permissions on plugin directories","id":"CVE-2021-41103"},"products":["esphome"],"published":"2021-09-28","related":[{"cvss_score":8.1,"headline":"ESP-IDF web_server basic auth bypass using empty or incomplete Authorization header","id":"CVE-2025-57808","kev_date_added":null,"published":"2025-09-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["esphome"]},"summary":"Attackers can perform unauthorized OTA updates on ESPHome devices with web_server enabled, bypassing configured HTTP basic authentication.","url":"https://insights.sbomify.com/CVE-2021-41104/"}