/

CVE-2026-63771

Severity:

HIGH RISK

(7.1)

HTTP Header Injection (CWE-113) in Adminer Cookies

CVE-2026-63771

Deferred

Vulnerability type

Category:

HTTP Response Header Injection

CWE:

CWE-113

Impact:

Cookie Security Control Bypass

Severity:

HIGH RISK

(7.1)

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

Adminer versions before 5.4.3 contain an HTTP header injection flaw where the X-Forwarded-Prefix header is used unsanitized when constructing Set-Cookie path attributes.

An attacker who can influence this header through a misconfigured reverse proxy may manipulate cookie attributes, downgrade SameSite protections, and enable cross-origin authenticated requests that bypass cookie-based security controls.

Affected context

This vulnerability appears in Adminer deployments placed behind reverse proxies that forward client-controlled headers like X-Forwarded-Prefix.

When the application reuses this header value to build Set-Cookie path attributes without proper sanitization or normalization, the cookie metadata becomes partially attacker-controlled.

The issue is most relevant where cookies enforce authentication or CSRF protections and where reverse proxy configuration allows untrusted manipulation of forwarding headers.

Exploit preconditions

  • Attack surface: Web interface exposed through a reverse proxy in front of Adminer.
  • Required access: Ability to send HTTP requests where X-Forwarded-Prefix (or equivalent) is not sanitized or overridden by the proxy; often feasible in misconfigured or shared proxy environments.
  • Trigger point: Server-side logic that constructs Set-Cookie headers using the X-Forwarded-Prefix header value directly in the cookie Path or related attributes.
  • Why exploitation is possible: The application trusts the forwarding header as canonical path input and incorporates it into the Set-Cookie response without validating characters, delimiters, or scope, enabling injection of crafted segments that alter cookie attributes such as SameSite.

Why this happens

The underlying flaw stems from using unvalidated, client-influenced HTTP headers when generating HTTP response headers, specifically Set-Cookie.

By incorporating X-Forwarded-Prefix directly into cookie path attributes, the application effectively allows user-controlled data to shape cookie scope and security flags.

This maps to CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers, generalized here as improper sanitization of header content used in response fields, allowing manipulation of cookie attributes and weakening of SameSite protections.

Potential impact

  • Attackers may downgrade or remove SameSite protections, enabling cross-site authenticated requests.
  • They could broaden or narrow cookie path scope, affecting which routes send sensitive cookies.
  • Cross-origin request protections relying on cookies can be bypassed, aiding CSRF-style attacks.
  • Session integrity and authentication boundaries may be weakened, potentially leading to unauthorized actions performed under a victim's authenticated session.

General mitigation guidance

Mitigation focuses on reducing trust in upstream headers and enforcing strict control of cookie metadata.

Common defensive patterns include:

  • Treating all client-controlled and proxy-forwarded headers (e.g., X-Forwarded-*) as untrusted and normalizing or whitelisting allowable values before reuse.
  • Separating internal routing logic from externally supplied path prefixes, using server-side configuration or explicit constants rather than reflecting header values into Set-Cookie attributes.
  • Applying robust encoding and validation to any header-derived data used in response headers, disallowing control characters and reserved delimiters.
  • Defining cookie attributes (Path, SameSite, Secure, HttpOnly) centrally and statically where possible, instead of deriving them dynamically from request metadata.
  • Configuring reverse proxies to strip, normalize, or override forwarding headers coming from clients so they cannot inject arbitrary values.

How teams detect issues like this

Detection can leverage a combination of code, configuration, and runtime analysis:

  • Static analysis: Search for usages where X-Forwarded-* or similar headers are read and then used when constructing Set-Cookie headers or other response headers without sanitization.
  • Code review: Flag patterns where cookie attributes, especially Path and SameSite, are built using request header values, URL prefixes, or other user-influenced fields.
  • Configuration review: Examine reverse proxy and load balancer configurations to ensure client-supplied X-Forwarded-* headers are either ignored or normalized.
  • Dynamic testing: Use security testing tools or scripts to inject unusual values into X-Forwarded-Prefix and observe the resulting Set-Cookie headers for signs of attribute manipulation or header anomalies.

Sources

SourceLink
github.comgithub.com/vrana/adminer/issues/1298
github.comgithub.com/vrana/adminer/releases#release-v5.4.3
github.comgithub.com/vrana/adminer/security/advisories/GHSA-c533-9qwm-8w5h
vulncheck.comvulncheck.com/advisories/adminer-cookie-injection-via-x-forwarded-prefix-header

Frequently asked

questions

Exploitability depends heavily on deployment topology.

It becomes practical when Adminer is behind a reverse proxy that passes through or trusts client-supplied X-Forwarded-Prefix headers, allowing attackers to influence cookie-related paths in the response.

Not necessarily.

The attacker mainly needs the ability to send crafted requests through a misconfigured proxy that forwards their X-Forwarded-Prefix header.

The impact, however, typically targets authenticated users whose cookie protections are weakened.

The most robust pattern is to stop deriving cookie attributes from client-influenced headers, instead using server-controlled configuration for cookie Path and security flags.

Any required use of forwarded headers should be gated by strict validation, canonicalization, and, where possible, a whitelist of allowed prefixes.

Adopt a policy that treats all incoming headers and paths as untrusted, avoiding their direct use in security-sensitive response fields like Set-Cookie.

Combine this with systematic code reviews for header usage, static analysis rules targeting header-to-cookie flows, and hardened reverse proxy configurations that sanitize or overwrite forwarding headers before they reach the application.

Find out what's already
exploitable in your codebase.