CVE-2026-24894: FrankenPHP leaks session data between requests in worker mode
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 sessionstart() 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(symboltable)). 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 (frankenphpresetsuperglobals) previously cleared other superglobals but failed to explicitly delete $SESSION.
Consequently, until sessionstart() 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 $SESSION before calling sessionstart(), it can access sensitive information (authentication tokens, user IDs, PII) belonging to the previous user. Logic Errors / Impersonation: If application logic relies on $SESSION being empty or unset to detect a "guest" state, or checks for specific keys in $SESSION prior 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 sessionstart() 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):
1. Client A sends a request that starts a session and sets sensitive data:
php // Request 1 sessionstart(); $SESSION['secret'] = 'AliceData'; sessionwriteclose();
2. Client B (or the same client without cookies) sends a request to the same worker. This script checks $SESSION without starting a session:
php // Request 2 // sessionstart() is NOT called if (!empty($SESSION)) { echo "Leaked Data: " . $SESSION['secret']; }
3. Result: Client B receives "Leaked Data: AliceData".
Workarounds
Ensure sessionstart() 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 $SESSION at the very beginning of the worker loop, before handling the request.
Other sources
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 sessionstart() is called. This vulnerability is fixed in 1.11.2.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-24894?
The severity of CVE-2026-24894 has not been officially classified, but it represents a session management flaw that can lead to unauthorized data access.
How do I fix CVE-2026-24894?
To fix CVE-2026-24894, upgrade to FrankenPHP version 1.11.2 or later.
What types of applications are affected by CVE-2026-24894?
CVE-2026-24894 affects applications running FrankenPHP in worker mode where session data is not properly reset.
What risks does CVE-2026-24894 pose to users?
CVE-2026-24894 poses a risk of session data exposure, allowing unauthorized access to session information from other users.
When was CVE-2026-24894 disclosed?
CVE-2026-24894 was disclosed as part of a security advisory related to the FrankenPHP project.