Tuskira AdvisoryNot observedLast updatedNovember 19, 2026

CVE-2026-126714

PHP's default file session handler can let an attacker plant objects in a session without logging in; fixed in PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13

Latest change
First published. PHP fixed it November 19 in 8.2.36, 8.3.37, 8.4.28 and 8.5.13.

Reachable if a server runs PHP before 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or 8.1 or older, with the default files session handler, and an attacker can get data into a session the application later reads, such as through session upload progress, which is on by default. No login is needed

Affected
PHP before 8.2.36, 8.3.37, 8.4.28 and 8.5.13, and all 8.1 and older, using the default files session handler
Exploitation
No exploitation reported. Not on CISA KEV. depthfirst's public proof only plants a harmless object.
Fix
PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13. Upgrade 8.1 and older to a supported branch.
Can't patch today
Turn off session.upload_progress.enabled if unused and limit untrusted data in sessions, per PHP

Every PHP site that uses the default file session handler is in scope, and PHP 8.1 and older get no fix. CVE-2026-126714 lets an attacker who can put data into a session, and cut a session write short, leave a session file holding parts of two sessions. When the session is read back, PHP can turn the attacker's bytes into objects. PHP fixed it on November 19, 2026 in 8.2.36, 8.3.37, 8.4.28 and 8.5.13, and says the flawed code goes back to PHP 4.1.0.

PHP rates it 9.2 Critical on CVSS 4.0, with no login needed. PHP says turning the planted objects into code execution needs a suitable gadget chain in the application. depthfirst, which published the research it calls phpAfterShell, says its own full chain did not need an application gadget and instead used a memory bug in a built-in PHP class. It has not published those details. Session upload progress, which is on by default, is one way for an attacker to get data into a session without logging in.

No exploitation has been reported, and it is not on CISA's Known Exploited Vulnerabilities catalog. depthfirst's public proof only plants a harmless object. Until you can upgrade, PHP says to turn off session upload progress if you do not need it and to limit untrusted data stored in sessions.

Is it reachable for you?

What it is. PHP's default session handler stores each session in a file. PHP says the vulnerable code writes new session data over the old file without clearing it first, so a write that stops partway leaves the start of the new session followed by the end of the old one. Read back, that mix can be decoded as objects the attacker chose. PHP says the fix clears the file before every write.

What has to be true. The server runs an affected PHP version with the files session handler, an attacker can get data into a session, a write gets interrupted at a useful point, and the application reads the session back, for example with session_start(). PHP says threaded PHP builds make the interruption easier to cause. PHP says session upload progress is one path in, and applications that store large user-controlled strings in sessions are another.

Checks, in three tiers. The first two decide exposure. The third decides priority. Run these only on systems your organization owns.

  1. Which servers run an affected PHP? php -v below 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or any 8.1 or older, is affected. Distribution packages may carry the fix without changing the version, per depthfirst, so compare against your distribution's advisory. Include containers and products that bundle PHP.
  2. Do they use the files handler with upload progress on? Check session.save_handler and session.upload_progress.enabled in php -i or phpinfo for each site. The PHP manual lists files as the default handler and upload progress as on by default, and both can be changed per directory.
  3. Which apps start sessions for visitors who have not logged in? Internet-facing apps that call session_start() for anonymous visitors, or store user-supplied data in sessions, go first. Threaded PHP builds go before others, per PHP.
What Tuskira checks for this flaw in your environment
Internet-facing PHP apps on an affected version with the files session handler that start sessions for anonymous visitors
What those PHP servers can reach
Across every system you run.
See how Tuskira finds exposed systems

Compensating controls (test them, don't assume them)

Upgrading PHP is the fix. PHP gives these temporary measures.

  • Turn off session upload progress. Set session.upload_progress.enabled to 0 in php.ini, per PHP. Only if no page uses upload progress bars. PHP notes this does not protect applications that store attacker-controlled data in sessions themselves.
  • Limit untrusted data in sessions. PHP says to keep the amount of untrusted data stored in sessions small. Only if you control the application code.
  • Use a session backend that replaces records whole. PHP says a backend that replaces session records atomically avoids this file-write defect. Only if the application can move off the files handler and you have tested it.

What to look for in logs

Neither PHP nor depthfirst has published indicators of compromise for CVE-2026-126714.

FAQ

Am I exposed to CVE-2026-126714?

You are if a server runs PHP before 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or any 8.1 or older, uses the default files session handler, and lets an attacker get data into a session that the application later reads. Session upload progress, on by default, is one way in without a login.

Is CVE-2026-126714 being exploited?

No exploitation has been reported, and it is not on CISA KEV as of the November 18, 2026 catalog release. depthfirst's public proof plants a harmless object and does not run code.

Does an attacker need a gadget chain in my app?

PHP says code execution needs a suitable gadget chain in the application. depthfirst says its own chain used a memory bug in a built-in PHP class instead, and has held back those details. Patch either way.

What about PHP 8.1 and older?

PHP says the flawed code has been present since 4.1.0, and only 8.2 and newer get fixed releases. Older versions stay exposed until they are upgraded.

Is this related to PHP2Shell?

depthfirst describes phpAfterShell as a follow-on to its PHP2Shell research. PHP treats it as a separate flaw with its own fix, so the PHP2Shell fixes do not cover it. Our PHP2Shell post covers that earlier issue.

Vendor
The PHP Group
Product
PHP, session extension (ext-session) with the default files save handler
Affected versions
PHP before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13 (PHP advisory GHSA-fm2m-fjf5-v3cp). PHP says the affected code has been present since PHP 4.1.0. Branches older than 8.2 get no fix
Vulnerable component
ext-session, files save handler (ps_files_write), per PHP
CVSS
9.2 Critical (PHP as CNA, CVSS 4.0, attack requirements Present). NVD has not added its own score
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (PHP)
CWE
CWE-367 and CWE-662 (PHP)
Exploitation
Not observed
CISA KEV added
Patch
PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13, released November 19, 2026. PHP 8.1 and older are end of life and get no fix. Distribution packages may carry the fix without changing the PHP version number, so check your distribution's advisory

Updates

Nov 19, 2026. First published. PHP fixed CVE-2026-126714 in 8.2.36, 8.3.37, 8.4.28 and 8.5.13; depthfirst published its research the same day. No exploitation reported; not on CISA KEV (catalog 2026.11.18).

Sources

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

We publish an advisory when a vulnerability is Critical or on CISA KEV, has one identifiable component to check, and has a public proof of concept or reported exploitation. Advisories are updated as exploitation status changes.