CVE-2026-126714
Partially overwritten session files can lead to remote code execution
| Publication Date | 2026-11-19 |
|---|---|
| Severity | High |
| Type | Remote Code Execution |
| Affected PHP Versions |
|
| Fixed Product Versions |
|
CVE Details
PHP's default file-based session handler can leave a session file with a mix of new and old data if a write is interrupted, so an attacker who can influence session data may inject objects and, if the application contains a suitable session serialization chain, run code on the server. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable session serialization chain. Session data can also be corrupted.
Recommendations
Switch to a non-file-based session handler (such as Redis or memcached), or use a userland session handler that does not rely on the filesystem (such as psr7-sessions/storageless, mezzio/mezzio-session with the mezzio/mezzio-session-cache backend, tedivm/stash-bundle for Symfony, etc). Update to a patched PHP version if possible.