CVE Professor
/
All CVEs
CVE-2026-137179

CVE-2026-137179 — Espressif Arduino-esp32 — CWE-287

CRITICAL CVSS 9.1 Shodan

arduino-esp32 is an Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2 microcontrollers. Prior to 3.3.12 and in 4.0.0-alpha1, WebServer::authenticate(const char *username, const char *password) parses an arbitrary non-empty Authorization value matching the configured username as OTHER_AUTH, and the built-in plaintext authenticator returns the configured password instead of rejecting the unsupported scheme. A remote unauthenticated attacker can therefore access HTTP endpoints protected by WebServer::authenticate(username, password) or AuthenticationMiddleware with a plaintext password, potentially exposing or modifying configuration, credentials, administrative functions, or device controls. Custom authentication callbacks and authenticateBasicSHA1() are not affected. This issue is fixed in versions 3.3.12 and 4.0.0.

arduino-esp32 is an Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2 microcontrollers. Prior to 3.3.12 and in 4.0.0-alpha1, WebServer::authenticate(const char *username, const char *password) parses an arbitrary non-empty Authorization value matching the configured username as OTHER_AUTH, and the built-in plaintext authenticator returns the configured password instead of rejecting the unsupported scheme. A remote unauthenticated attacker can therefore access HTTP endpoints protected by WebServer::authenticate(username, password) or AuthenticationMiddleware with a plaintext password, potentially exposing or modifying configuration, credentials, administrative functions, or device controls. Custom authentication callbacks and authenticateBasicSHA1() are not affected. This issue is fixed in versions 3.3.12 and 4.0.0.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑137179 – “arduino‑esp32 WebServer::authenticate() logic bypass”

AttributeValue
CWECWE‑287: Improper Authentication
CVSS v3.19.1 (CRITICAL) – AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Affected componentWebServer::authenticate(const char *username, const char *password) in the Arduino‑ESP32 core (versions < 3.3.12 and 4.0.0‑alpha1).

| Root cause | The WebServer class is used to protect HTTP endpoints with basic‑auth style checks. Internally the method parses the Authorization header and classifies the authentication scheme. The code path that handles any non‑empty Authorization value that matches the configured username but does not start with the supported scheme (Basic) is incorrectly labelled as OTHER_AUTH. The built‑in plaintext authenticator (_authPlain) then returns the configured password instead of rejecting the request. Consequently, an attacker can supply an arbitrary authentication scheme (e.g., Foo) together with the correct username and receive the plaintext password in the HTTP response body, bypassing the intended authentication check.

Why the CVSS vector matches

  • AV:N – The attacker can reach the vulnerable device over the network (the ESP32 typically runs a Wi‑Fi or Ethernet web server).
  • AC:L – Exploitation requires only a single HTTP request; no special privileges or timing are needed.
  • PR:N – No authentication is required to trigger the bug.
  • UI:N – No user interaction is needed; the request can be sent automatically.
  • S:U – The impact is unchanged* across the system – the vulnerability does not alter the attack surface for other components.
  • C:H / I:H / A:N – The attacker obtains the plaintext password (confidentiality) and can then call any endpoint that is protected by WebServer::authenticate(), effectively gaining full control (integrity) without causing a denial‑of‑service.

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All command‑line examples are syntactically valid and can be executed from a Linux/macOS terminal. Where the exact URI or parameter name is not disclosed in the CVE text, the example is marked as illustrative.

    1️⃣ Discovery & Reconnaissance

    GoalTechniqueDetails
    Identify that the device runs the Arduino‑ESP32 core and its versionBanner grabbing / HTTP header inspectionMany ESP32 sketches expose a / or /status page that prints the firmware version, e.g. Server: arduino-esp32/3.3.11. A simple curl -I http://<target>/ can reveal the Server header.
    Confirm that the web server uses WebServer::authenticate() for protectionEndpoint probingAccess a known protected endpoint (e.g., /config, /admin, /update). If the server returns 401 Unauthorized with a WWW-Authenticate: Basic realm="..." header, it is using the built‑in authenticator.
    Determine the configured username (if not obvious)Brute‑force / default credentialsMany Arduino sketches ship with a default username such as admin or user. Trying common defaults with a normal Basic auth request (curl -u admin:wrong http://<target>/admin) will elicit a 401 response, confirming the username.
    Note: The above steps rely only on publicly observable network traffic; no prior authentication is required.

    2️⃣ Exploitation

    Core idea: Send an Authorization header that does not start with Basic but whose token (the part after the scheme) is the base‑64 encoding of the configured username. The server will treat the request as OTHER_AUTH and will echo the stored password in the response body.

    2.1 Craft the malicious header

    Assume the configured username is admin.

    # Base64‑encode the username (no password part)
    USERNAME="admin"
    ENCODED=$(printf "%s" "$USERNAME" | base64)   # => YWRtaW4=

    2.2 Send the request with an arbitrary scheme (e.g., Foo)

    curl -s -D - -H "Authorization: Foo $ENCODED" http://<target>/admin

    What happens:

  • The server parses the header, sees a non‑empty value, and because the scheme (Foo) is not Basic, it classifies it as OTHER_AUTH.
  • The internal plaintext authenticator (_authPlain) looks up the stored password for the user admin and returns it in the HTTP response body instead of rejecting the request.
  • The attacker now knows the plaintext password (e.g., SuperSecret123).
  • 2.3 Use the recovered password to authenticate normally

    curl -s -u admin:SuperSecret123 http://<target>/admin

    Now the attacker can call any endpoint protected by WebServer::authenticate() (or the higher‑level AuthenticationMiddleware) with full privileges.

    Illustrative example – The exact URI (/admin) is typical for sketches that expose a configuration UI, but the vulnerability works on any endpoint that relies on WebServer::authenticate(username,password).

    3️⃣ Post‑exploitation

    PhaseWhat the attacker can do
    Privilege escalationThe attacker now possesses the *plaintext* password that the firmware uses for all privileged HTTP actions. This is equivalent to “admin” rights on the device.
    Configuration tamperingModify Wi‑Fi credentials, OTA update URLs, or other security‑critical settings via the protected endpoints (e.g., /wifi, /ota).
    Credential harvestingIf the device stores other secrets (API keys, MQTT passwords) in its configuration UI, the attacker can retrieve them.
    PersistenceUpload a malicious sketch or replace the OTA binary (if the device offers an OTA endpoint) to maintain long‑term control.
    Lateral movementUse the compromised device as a foothold to pivot to the internal network (e.g., via MQTT broker credentials stored on the ESP32).
    Denial of Service (optional)Though not part of the CVSS impact, the attacker could flood the device with malformed Authorization headers to exhaust its limited RAM, causing a reboot.

    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS)
    Confidentiality (C:H)The attacker obtains the clear‑text password used for HTTP authentication, which may also be reused for other services (e.g., MQTT, SSH).
    Integrity (I:H)With the password, the attacker can change device configuration, upload malicious firmware, or issue commands that affect physical actuators (relays, motors, sensors).
    Availability (A:N)The vulnerability does not directly cause service interruption, but a malicious actor could later trigger a DoS by misusing the gained privileges.

    Practical consequences

  • Industrial IoT – ESP32‑based controllers in factories could be reprogrammed to alter process parameters, leading to safety hazards.
  • Smart Home – Compromised thermostats, door locks, or lighting controllers could be hijacked, exposing occupants to privacy breaches or physical intrusion.
  • Edge Gateways – Devices that forward telemetry to cloud services could be forced to send falsified data, undermining analytics and compliance.
  • Given the network‑exposed nature of many ESP32 deployments (often on the same LAN as critical assets), the risk rating is critical.


    🛡️ Remediation & Mitigation

    1️⃣ Patch / Upgrade

    Affected versionsFixed in
    < 3.3.12 (any 3.x series)3.3.12
    4.0.0‑alpha1 (the only 4.x pre‑release)4.0.0 (or any later stable 4.x release)

    Action:

  • Update the Arduino‑ESP32 core in the Arduino IDE or PlatformIO to ≥ 3.3.12 (or the latest 4.x stable).

  • Re‑compile and flash the firmware after the upgrade.
  • 2️⃣ Workarounds (if immediate patching is impossible)

    MitigationImplementation details
    Restrict network accessPlace the ESP32 device behind a firewall or VLAN that only allows trusted hosts (e.g., the provisioning workstation). Block inbound traffic from the internet or untrusted LAN segments (iptables rule example):<br>iptables -A INPUT -p tcp -s <trusted‑IP>/32 --dport 80 -j ACCEPT<br>iptables -A INPUT -p tcp --dport 80 -j DROP
    Disable the built‑in authenticatorIf the sketch does not need HTTP authentication (e.g., it is only reachable via a VPN), comment out or remove calls to WebServer::authenticate() and replace them with a custom token check that validates the scheme explicitly.
    Enforce HTTPS + HSTSServe the UI over TLS (e.g., using ESPAsyncWebServer with SSL). While TLS does not fix the logic bug, it prevents credential leakage on the wire and makes passive network sniffing harder.
    Add a WAF/ModSecurity rule (for devices that sit behind a reverse‑proxy)``<IfModule mod_security2.c>`<br>SecRule REQUEST_HEADERS:Authorization "@rx ^(?!Basic ).+" "id:100001,phase:1,deny,log,msg:'Block non‑Basic Authorization schemes on ESP32 admin endpoints'"<br>`</IfModule>`<br>This rule drops any request that contains an Authorization header not starting with Basic`.
    Rotate credentialsAfter patching, change the HTTP username/password to a strong, randomly generated secret. Invalidate any previously leaked passwords.

    3️⃣ Detection – Log patterns & IoCs

    IndicatorExample log line (Arduino Serial output or proxy log)
    Unexpected Authorization schemeGET /admin 401 - Authorization: Foo YWRtaW4=
    Plain‑text password echoed in responseHTTP/1.1 200 OK followed by SuperSecret123 in the body (visible in proxy capture).
    Repeated authentication attempts with different schemesGET /admin 401 - Authorization: Bar YWRtaW4=<br>GET /admin 401 - Authorization: Baz YWRtaW4=
    Successful login without BasicGET /admin 200 - Authorization: Foo YWRtaW4= (should never be 200).
    Outbound OTA update after credential theftLook for HTTP POST /update with a large binary payload shortly after a successful auth bypass.

    Monitoring suggestions

  • Enable debug logging in the ESP32 sketch (server.onNotFound([](){ Serial.println("404"); });) and forward logs to a central syslog server.
  • Deploy a network IDS rule (e.g., Suricata) that alerts on Authorization headers not starting with Basic destined for port 80/443 on ESP32 IP ranges.

  • ⚠️ Urgency

  • CVSS 9.1 (Critical) – Remote, unauthenticated, low‑effort exploitation with a high‑impact payoff (full admin control).
  • No CISA KEV listing – The vulnerability is not yet in the U.S. government’s “Known Exploited Vulnerabilities” catalog, but the technical characteristics make it highly exploitable* in the wild.
  • Attack complexity – Very low (single crafted HTTP request).
Patch priority: Critical / Immediate for any production or field‑deployed ESP32 devices that expose a web UI. Organizations should:

1. Patch to ≥ 3.3.12 or ≥ 4.0.0 within 24 hours of discovery.
2. If patching cannot be performed instantly, apply network‑level blocking (firewall/WAF) and rotate credentials as a stop‑gap.

Given the prevalence of ESP32 in IoT gateways, smart‑home appliances, and industrial edge controllers, the window for exploitation is large; delaying remediation dramatically increases the risk of a full device takeover.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="espressif arduino-esp32"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-137179
Technical reference / advisory repository for CVE-2026-137179
Technical reference / advisory repository for CVE-2026-137179
Technical reference / advisory repository for CVE-2026-137179
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (1)
espressif:arduino-esp32
References & Advisories (4)
Related CVEs
9.8
CVE-2026-145051
WWBN AVideo before 29.9.0 contains an authentication bypass vulnerability in the LoginWordPress plugin that al
9.3
CVE-2026-47677
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.3, there is an authe
8.7
CVE-2026-120762
Improper authorization in the push-publish bundle receiver (user import handler) in dotCMS versions before 26.
8.1
CVE-2026-145022
ZITADEL from 4.0.0 before 4.20.5 contains an MFA bypass vulnerability in Login V2 that allows attackers knowin
7.7
CVE-2026-132111
Improper authentication in the legacy login path (LoginFactory.doLogin) in dotCMS versions before 26.11.11-01
5.4
CVE-2026-144906
A flaw was found in the UMA permission grant implementation of Keycloak, an identity and access management sol
5.3
CVE-2026-144816
A vulnerability has been found in EZVIZ CS-C2C and CS-C6c 5.3. Affected is an unknown function of the componen