8.7high
FrankenPHP leaks session data between requests in worker mode
- Severity
- 8.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r3xh-3r3w-47gpGO-2026-4489
Description
FrankenPHP is a modern application server for PHP. Prior to 1.11.2, when running FrankenPHP in worker mode, the $_SESSION superglobal is not correctly reset between requests. This allows a subsequent request processed by the same worker to access the $_SESSION data of the previous request (potentially belonging to a different user) before session_start() is called. This vulnerability is fixed in 1.11.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| php frankenphp | < 1.11.2, before 1.11.2 | CVE List, NVD |
| github.com/dunglas/frankenphp (Go) | before 1.11.2 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
FrankenPHP is a modern application server for PHP. Prior to 1.11.2, when running FrankenPHP in worker mode, the $_SESSION superglobal is not correctly reset between requests. This allows a subsequent request processed by the same worker to access the $_SESSION data of the previous request (potentially belonging to a different user) before session_start() is called. This vulnerability is fixed in 1.11.2.
GitHub Advisory Database
Summary
When running FrankenPHP in worker mode, the $_SESSION superglobal is not correctly reset between requests. This allows a subsequent request processed by the same worker to access the $_SESSION data of the previous request (potentially belonging to a different user) before session_start() is called.
Details
In standard PHP execution, the environment is torn down completely after every request. In FrankenPHP's worker mode, the application stays in memory, and superglobals are manually reset between requests.
The vulnerability exists because $_SESSION is stored in the Zend Engine's symbol table (EG(symbol_table)). While the standard PHP request shutdown (RSHUTDOWN) decrements the reference count of the session data, it does not remove the $_SESSION variable itself from the symbol table. FrankenPHP's reset logic (frankenphp_reset_super_globals) previously cleared other superglobals but failed to explicitly delete $_SESSION.
Consequently, until session_start() is called in the new request (which re-initializes the variable), the $_SESSION array retains the data from the previous request processed by that specific worker thread.
Impact
This is a cross-request data leakage vulnerability.
- Confidentiality: If an application reads
$_SESSIONbefore callingsession_start(), it can access sensitive information (authentication tokens, user IDs, PII) belonging to the previous user. - Logic Errors / Impersonation: If application logic relies on
$_SESSIONbeing empty or unset to detect a "guest" state, or checks for specific keys in$_SESSIONprior to session initialization, a malicious actor (or accidental race condition) could trigger privilege escalation or user impersonation.
This affects only users running FrankenPHP in worker mode and not session_start() for each request, which is done by default by most frameworks.
PoC
The following steps demonstrate the issue (derived from the regression tests added in the fix):
- Client A sends a request that starts a session and sets sensitive data:
// Request 1
session_start();
$_SESSION['secret'] = 'AliceData';
session_write_close();
- Client B (or the same client without cookies) sends a request to the same worker. This script checks
$_SESSIONwithout starting a session:
// Request 2
// session_start() is NOT called
if (!empty($_SESSION)) {
echo "Leaked Data: " . $_SESSION['secret'];
}
- Result: Client B receives "Leaked Data: AliceData".
Workarounds
- Ensure
session_start()is called immediately at the entry point of your worker script to overwrite any residual data (though this may not cover all edge cases if middleware runs before the controller). - Manually unset
$_SESSIONat the very beginning of the worker loop, before handling the request.
Go Vulnerability Database
FrankenPHP leaks session data between requests in worker mode in github.com/dunglas/frankenphp
NVD (es)
FrankenPHP es un moderno servidor de aplicaciones para PHP. Antes de la versión 1.11.2, al ejecutar FrankenPHP en modo worker, la superglobal $_SESSION no se restablece correctamente entre solicitudes. Esto permite que una solicitud subsiguiente procesada por el mismo worker acceda a los datos de $_SESSION de la solicitud anterior (potencialmente perteneciente a un usuario diferente) antes de que se llame a session_start(). Esta vulnerabilidad se corrige en la versión 1.11.2.
References
| https://github.com/php/frankenphp/security/advisories/GHSA-r3xh-3r3w-47gp | advisory, exploit, vendor-advisory, web | |
| https://github.com/php/frankenphp/commit/24d6c991a7761b638190eb081deae258143e9735 | patch, web | |
| https://github.com/php/frankenphp/releases/tag/v1.11.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-24894 | advisory | |
| https://github.com/php/frankenphp | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-24894 changed 2026-02-12 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r3xh-3r3w-47gp changed 2026-02-19 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4489 changed 2026-02-19 | CC-BY-4.0 |
| NVD | CVE-2026-24894 changed 2026-06-17 | Public domain |