What to do6 steps
Upgrade PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12.
8.6.0 RC4 is also an option. Minimal source backports exist for 7.4, 8.0 and 8.1.
Restart every PHP worker after upgrading.
If you cannot patch, set
session.upload_progress.enabled=0.This is for CVE-2026-109619. Set it in
php.inior the pool config (notini_setor.user.ini). On 8.5, also setfatal_error_backtraces=0.If you cannot patch, keep
post_max_sizeconservative.This is for CVE-2026-109618. Also limit request size, input nesting, variables and multipart parts at the frontend. Do not use
RLIMIT_ASorRLIMIT_DATA.Do not rely on hiding error output.
It does not mitigate either bug.
For CVE-2026-115560, set
session.upload_progress.enabled=0.This related CVE matters if your application changes
session.serialize_handlerat runtime. Keep the setting until the next PHP bugfix release, even on patched versions. If you already set it for CVE-2026-109619, keep it.
Are you affected?only if all are true
- mod_php: RCE validated under default settings (highest risk).
- PHP-FPM: may be susceptible after normal startup.
- CVE-2026-109619 needs session upload progress (session.upload_progress.enabled, on by default), or fatal_error_backtraces on 8.5.
- Persistent workers reuse globals across requests; the bugs fire before any application code runs.
Check your version
- PHP CLI and PHP-FPM
php -v - PHP CLI and PHP-FPM
php-fpm -v - Container image
docker run --rm --entrypoint php <image> -v - Prompt for your own agent, read-onlyAm I affected by PHP2Shell?
Read the prompt
Check whether the systems I am authorized to inspect are affected by PHP2Shell (CVE-2026-109618, CVE-2026-109619). Unauthenticated RCE in PHP core: an out-of-memory longjmp leaves half-initialised request state, and persistent workers reuse globals that point into a freed request heap. It is exploitable under these conditions: - mod_php: RCE validated under default settings (highest risk). - PHP-FPM: may be susceptible after normal startup. - CVE-2026-109619 needs session upload progress (session.upload_progress.enabled, on by default), or fatal_error_backtraces on 8.5. - Persistent workers reuse globals across requests; the bugs fire before any application code runs. Fixed releases: - PHP: 8.2.35 (branch 8.2), 8.3.36 (branch 8.3), 8.4.27 (branch 8.4), 8.5.12 (branch 8.5) 8.1 and older get no official release; php.net published minimal source backports for 7.4, 8.0 and 8.1. Commands the catalog lists to find the version or the setting (read each one before you run it): - PHP CLI and PHP-FPM: php -v - PHP CLI and PHP-FPM: php-fpm -v - Container image: docker run --rm --entrypoint php <image> -v What the catalog says to do on an affected system (report these, do not carry them out): 1. Upgrade PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12. 2. Restart every PHP worker after upgrading. 3. If you cannot patch, set session.upload_progress.enabled=0. 4. If you cannot patch, keep post_max_size conservative. 5. Do not rely on hiding error output. 6. For CVE-2026-115560, set session.upload_progress.enabled=0. For each host, container image or application, report affected, not affected, fixed or unknown, with the evidence, and list anything you could not access. Work read-only: do not change configuration, restart services or send exploit input. More: https://php.2shell.wtf/php2shell
Affected versions4 branches
| PHP branch | Fixed in |
|---|---|
| 8.2 | 8.2.35 |
| 8.3 | 8.3.36 |
| 8.4 | 8.4.27 |
| 8.5 | 8.5.12 |
8.1 and older get no official release; php.net published minimal source backports for 7.4, 8.0 and 8.1.
Proof of concept1 public PoC
For testing systems you own or are authorized to test. A PoC repository can be fake or carry malware: read it before you run it.
- Open the PoC
Public proof-of-concept repositories on GitHub. The most-starred, ikow/php2shell-poc, bundles five pre-auth RCE chains for session.upload_progress with Suricata, Sigma and ModSecurity detection rules.
Timeline6 events
Reported to the vendor
Reports reach the PHP security team
Exploited in the wild
Exploitation attempts seen by AWS MadPot, before public disclosure
Patched
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 released
Public PoC
Public proof-of-concept repositories on GitHub. The most-starred, ikow/php2shell-poc, bundles five pre-auth RCE chains for session.upload_progress with Suricata, Sigma and ModSecurity detection rules.
Added to CISA KEV
Both CVEs added to CISA Known Exploited Vulnerabilities
Exploited in the wild
GreyNoise sees the first confirmed exploitation: the web server on a vulnerable sensor ran OS commands
Sources20 links
- PHP security announcement
- CVE-2026-109618: out-of-memory corruption
- CVE-2026-109619: stale global state
- CVE-2026-109618
- CVE-2026-109619
- PHP informational advisory: session upload progress (related CVE-2026-115560)
- CISA alert
- CERT-EU advisory 2026-018
- UK NCSC guidance
- Canadian Centre for Cyber Security AL26-026
- Calif: a tale of two PHP remote vulnerabilities
- Wiz: PHP2Shell technical analysis
- Datadog Security Labs: detection and remediation
- OpenAI: coordinating the PHP response
- AWS: exploitation seen before disclosure
- Delft Threat Intelligence Lab: PHP2Shell in the wild
- GreyNoise: PHP2Shell activity
- Cloudflare: WAF protections against php2shell
- Cloudflare Zero Wire: php2shell briefing
- Tenable: frequently asked questions
Sources checked on . This page tells you how to check and what to install. It cannot tell you that you are safe.
8 changes since it was published
- Linked the most-starred public proof of concept.
- Remediation steps got short titles; no fact changed.
- Updated source links that moved to a new address.
- Added the related CVE-2026-115560 (session upload progress, not fixed in the 21 October releases), Cloudflare's WAF write-up and the Cloudflare Zero Wire briefing.
- Added the CISA KEV listing, the first confirmed exploitation seen by GreyNoise, and the Delft and GreyNoise exploitation trackers.
- Added the public proof-of-concept repositories to the exploit status.
- Added commands to check the installed version.
- Removed the detection tool links (Nuclei template, Secure the Web, Censys dashboard).