php2shell: PHP remote code execution via session upload progress
Affects PHP before 8.2.36, 8.3.37, 8.4.28 and 8.5.13 when session upload progress is on and sessions are written with php_binary or php_serialize but read with php. Fixed in those versions.
- Exploited
- Public exploit code, no confirmed attacks
- Fix
- Fixed in 8.2.36, 8.3.37, 8.4.28, 8.5.13
- Who is exposed
- Specific setups only
Summary
PHP has a flaw where session upload progress data, when enabled, can be read back with a mismatched session serializer, letting an attacker inject objects into the application. A remote attacker who can submit a multipart upload, without logging in, could use this to run code if the application contains a suitable gadget chain, or to corrupt sessions or cause a denial of service.
Written by a model
Original description
Session serializer mismatch can lead to remote code execution.
Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service.
This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
Who should check
Teams running PHP before 8.2.36, 8.3.37, 8.4.28 or 8.5.13 with session upload progress enabled and different session serializers sharing one session store
Not fixed by: Updating alone does not enforce matching serializers if upload progress is explicitly enabled.
“Session upload progress is enabled, and an attacker can submit a multipart upload to a context using php_binary or php_serialize as its session serializer.”
What to do
Check whether your setup matches what the bug needs.
Session upload progress is enabled and an attacker can submit a multipart upload to a context using php_binary or php_serialize as session serializer The same stored session is later read using the php serializer with the same session ID For code execution, the reading application must have a usable deserialization gadget chain With the files handler, both sides must share the same session storage directory and have file access permissionsUpgrade to a fixed version: 8.2.36, 8.3.37, 8.4.28, 8.5.13.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-115560 (Session serializer mismatch can lead to remote code execution), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-115560 (entry last updated 2026-11-20):
Affected:
- PHP Group PHP: fixed in 8.2.36; from 8.3.0, fixed in 8.3.37; from 8.4.0, fixed in 8.4.28; from 8.5.0, fixed in 8.5.13
Fixed versions: 8.2.36, 8.3.37, 8.4.28, 8.5.13.
Conditions (all must be true for the bug to be hit):
- Session upload progress is enabled and an attacker can submit a multipart upload to a context using php_binary or php_serialize as session serializer (source: https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx)
- The same stored session is later read using the php serializer with the same session ID (source: https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx)
- For code execution, the reading application must have a usable deserialization gadget chain (source: https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx)
- With the files handler, both sides must share the same session storage directory and have file access permissions (source: https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-115560 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-115560 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-115560
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-115560"}.Affected versions
- PHP Group PHPfixed in 8.2.36; From 8.3.0 · fixed in 8.3.37; From 8.4.0 · fixed in 8.4.28; From 8.5.0 · fixed in 8.5.13
cve.now Index
- Exploitation22/40Public exploit on Exploit-DB or GitHub
- Exposure12/25Specific setups only, reachable over the network without a login
- Reach17/20Affects PHP (a widely deployed server, runtime, framework or database)
- Severity10/10CVSS 9.2, total technical impact per CISA
- No patch0/5No signal
What would change the score
- Would score about 89 if added to CISA KEV
- Would score about 84 if CISA's SSVC rates exploitation active
Timeline
- cve.now early warning
PHP readies critical updates to patch RCE flaw CVE-2026-115560
1 day - CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- CVE published
- First seen by cve.now
- Posted on X by cve.now1 day
- Exploit code on GitHub
LLCForge/CVE-2026-115560
- Record last updated
- EPSS reached 10%
FIRST estimates at least a 10% chance of exploitation in the next 30 days
Evidence 15
Questions about CVE-2026-115560
Is CVE-2026-115560 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. Public exploit code exists (a proof of concept on GitHub). Its EPSS score, the predicted chance of exploitation in the next 30 days, reached 10% or higher on 2026-11-20.
Source: cve.now feed data
What does this mean?
When one part of an application stores a session with the php_binary or php_serialize serializer and another reads it with the php serializer, the data can be misread. Per the advisory, this can lead to remote code execution if the reading application has a suitable deserialization gadget chain. It can also cause file modification, session corruption or denial of service.
Source: github.com
Which versions are affected by CVE-2026-115560?
PHP: before 8.2.36; from 8.3.0 before 8.3.37; from 8.4.0 before 8.4.28; from 8.5.0 before 8.5.13.
Source: cve.now feed data
Am I affected, and how do I check?
PHP versions before 8.2.36, 8.3.37 (from 8.3.0), 8.4.28 (from 8.4.0) and 8.5.13 (from 8.5.0) are in the affected ranges. The advisory's conditions are that session upload progress is enabled, an attacker can submit a multipart upload to a context using php_binary or php_serialize, and the same session is later read with the php serializer under the same session ID. With the files handler, both sides must also share the same session storage directory and have file access permissions. Running php -v shows the version, and the session.serialize_handler and session.upload_progress.enabled settings can be checked in php.ini or with phpinfo().
Source: github.com
How do I fix CVE-2026-115560?
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13, whichever matches the release branch in use. The facts name no separate workaround.
Source: github.com
Related
- SZB-2fc055d03dStarted as this early warning
- CVE-2026-129289PHP-FPM request smuggling through an unread HTTP request body
- CVE-2026-129496Timezone cache use-after-free can lead to remote code execution
- CVE-2026-129481Use-after-free after interrupted session shutdown
- CVE-2026-126714Partially overwritten session files can lead to remote code execution
- CVE-2026-129474Use-after-free in magic method backtraces can lead to remote code execution
No corrections so far. Something wrong on this page? Report an error.