/

CVE-2026-41448

Severity:

CRITICAL RISK

(9.4)

Path Traversal (CWE-22) in AdGuard Home GL.iNet Auth

CVE-2026-41448

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Authentication Bypass and Full Administrative Compromise

Severity:

CRITICAL RISK

(9.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

AdGuard Home instances started with the --glinet flag contain a path traversal flaw in the authentication middleware that processes the Admin-Token cookie.

By injecting traversal sequences into the token value, an unauthenticated attacker can bypass authentication and gain full admin access when the token file path is constructed unsafely.

Affected context

The vulnerability affects AdGuard Home deployments launched with the --glinet flag, which enables a GL.iNet-specific authentication middleware.

In this mode, the middleware derives a token file path from the Admin-Token cookie using direct string concatenation without normalizing or constraining the resulting path.

When the application trusts this derived path to validate admin access, a crafted traversal sequence can redirect file reads to attacker-controlled or unrelated locations, undermining the authentication decision.

Exploit preconditions

  • Attack surface: HTTP(S) interface of AdGuard Home when started with --glinet.
  • Required access: Network reachability to the management interface; no prior authentication required.
  • Trigger point: Any request where the attacker can control the Admin-Token cookie or header that the GL.iNet auth middleware uses.
  • Why exploitation is possible: The token file path is built using unsanitized string concatenation, and the resulting path is not restricted to an expected directory or canonicalized before use, enabling directory traversal and token validation bypass.

Why this happens

The core issue maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The authentication logic in the GL.iNet-specific middleware constructs a filesystem path for an admin token file by directly concatenating a base directory with the user-supplied Admin-Token value.

Because the input is neither normalized nor checked for traversal sequences (such as ../), the resulting path may escape the intended token directory, allowing the code to read arbitrary files and treat their presence or content as proof of admin authentication.

This pattern reflects a broader bug class where trust decisions depend on file paths derived from unvalidated user input.

Potential impact

  • Unauthenticated attackers may gain full administrative access to AdGuard Home.
  • Attackers could modify DNS filtering rules, blocklists, and upstream DNS settings.
  • Adversaries can potentially exfiltrate configuration data and sensitive logs accessible to the AdGuard Home process.
  • Compromised instances may be used to redirect or intercept user DNS traffic, enabling phishing or surveillance.
  • Attackers could disable security features and prepare follow-on attacks within the local network.

General mitigation guidance

Mitigation typically focuses on constraining and validating any filesystem paths derived from user input and decoupling authentication from arbitrary file reads.

Common defensive patterns include:

  • Restricting token file resolution to a fixed, known directory and rejecting any paths that contain traversal sequences or absolute-path markers.
  • Using safe path-join utilities that canonicalize and verify the resulting path remains within an expected root.
  • Treating header and cookie values as untrusted data, validating them against strict formats (e.g., whitelisting token ID patterns) before they influence filesystem access.
  • Designing authentication mechanisms that use opaque, server-generated identifiers (e.g., random tokens or signed cookies) rather than file names derived from client input.
  • Running the AdGuard Home process with least-privilege filesystem access so that even if path resolution is flawed, the process cannot read arbitrary sensitive system files.

How teams detect issues like this

Effective detection approaches generally combine code-level analysis with behavioral monitoring:

  • Static analysis: Configure rules to flag any use of user-controlled data in filesystem APIs (open/read/write) without prior normalization or directory checks, especially in authentication and authorization code paths.
  • Code review signals: During manual review, look for string concatenation when building paths from cookie or header values, missing canonicalization (e.g., no clean/normalize step), and absence of checks that the resolved path resides under a specific directory.
  • Policy enforcement: Define secure coding guidelines that require approved helper functions for path construction and forbid direct concatenation of user input into filesystem paths.
  • Runtime monitoring: Where feasible, log and monitor unexpected access to token directories or configuration files, especially when paths contain traversal patterns, and trigger alerts for suspicious access attempts.
  • Automated code scanning and CI-integrated security linters can help identify these patterns before deployment.

Sources

SourceLink
github.comgithub.com/AdguardTeam/AdGuardHome/releases/tag/v0.107.77
vulncheck.comvulncheck.com/advisories/adguard-home-authentication-bypass-via-path-traversal-in-admin-token-cookie

Frequently asked

questions

Yes, if the AdGuard Home management interface is reachable over the network and the instance is started with the --glinet flag, an attacker can exploit the flaw by sending crafted HTTP requests that manipulate the Admin-Token value.

No prior authentication is required; the vulnerability stems from the way the authentication middleware processes the Admin-Token, allowing an unauthenticated user to bypass normal login checks. Only network access to the vulnerable interface is needed.

The safest pattern is to avoid deriving filesystem paths directly from user input and instead use opaque token identifiers stored in a controlled backend (e.g., database or in-memory store). If file-based tokens are required, validate token identifiers against a strict allowlist format, safely join them with a fixed directory, canonicalize the path, and reject any result that escapes the intended directory.

Treat all client-supplied data as untrusted, enforce strict input validation, and centralize path handling through vetted utility functions that normalize and constrain paths. Complement this with security reviews focused on auth and file-access code, static analysis rules for path construction, and adherence to least-privilege principles for filesystem permissions.

Find out what's already
exploitable in your codebase.