GHSA-79wv-8rh2-9vp2 - AdminNeo has Cookie Attribute Injection via Unsanitized X-Forwarded-Prefix in Set-Cookie Headers
### Summary
AdminNeo versions 4.6.0 through at least 5.5.0 are vulnerable to cookie attribute injection via the `X-Forwarded-Prefix` HTTP header. An attacker who can influence this header (e.g., through a reverse proxy that forwards it from clients, an attacker-controlled upstream proxy, or a man-in-the-middle position) can inject arbitrary cookie attributes including `Domain`, `Path`, `Secure`, and `SameSite` into all `Set-Cookie` response headers emitted by AdminNeo.
This allows an attacker to expand the cookie scope to an attacker-controlled domain (e.g., `Domain=.evil.com`), causing the victim's browser to send AdminNeo's `neo_sid` (session ID) and `neo_key` (database password encryption key) cookies to the attacker's server on subsequent requests.
Originally reported by @retkoussa in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-c533-9qwm-8w5h
### Vulnerable Code
**Root cause 1 - Unsanitized header prepended to `REQUEST_URI`**
(`admin/include/bootstrap.inc.php`, lines 50โ52):
```php
if ($_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
$_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
}
```
The client-supplied `X-Forwarded-Prefix` header is concatenated into `REQUEST_URI` with no validation or sanitization of special characters (specifically semicolons, which delimit cookie attributes).
**Root cause 2 - Manual `Set-Cookie `header construction without escaping**
(`admin/include/functions.inc.php`, lines 416โ424):
```php
function cookie(string $name, string $value, int $lifetime = 2592000): void
{
header("Set-Cookie: $name=" . rawurlencode($value)
. ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
. "; path=" . preg_replace('~\?.*~', '', $_SERVER["REQUEST_URI"])
. (HTTPS ? "; secure" : "")
. "; HttpOnly; SameSite=lax",
false);
}
```
The tainted `REQUEST_URI` is interpolated directly into the `path=` attribute of the `Set-Cookie` header. Since semicolons a
HIGH
Severity & confidence
Source severityhigh
Platform severityhigh
Confidencemedium
Exploitationunknown
CVSS8.2
Affected
Vendorsadminneo-org
Productsadminneo-org/adminneo
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-30T22:52:47
Last updated2026-11-09T09:51:15
Ingested2026-10-30T22:59:15
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories