Skip to content
Breach Index · running record

PHP vulnerabilities in 2026: PHP2Shell and phpAfterShell (not a breach of the PHP project)

PHP is the open-source language behind a large share of web servers, maintained by The PHP Group and its security team. A flaw in PHP itself reaches every application that runs on it, from Nextcloud to custom code on cloud instances. This page tracks PHP2Shell and phpAfterShell and keeps the PHP project's fixes apart from what researchers report about exploitation.

Short answer

Was PHP hacked?

No, PHP2Shell is not a breach of php.net or the PHP project: nothing reported shows an intrusion at PHP. It is a pair of vulnerabilities in PHP. On 21 October 2026 PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix CVE-2026-109618 (remote code execution via out-of-memory corruption) and CVE-2026-109619 (remote code execution via stale global state), each CVSS v4.0 9.2, and said there are no complete mitigations.

Exploitation followed. CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October 2026. On 18 November SOCRadar reported one operator's AI-agent-assisted campaign that, by its count, compromised 404 hosts out of 595 targeted IPs in 57 countries. The victims are organisations running unpatched PHP, not the PHP project.

On 19 November 2026 PHP released 8.5.13, 8.4.28, 8.3.37 and 8.2.36, fixing phpAfterShell (CVE-2026-126714, CVSS v4.0 9.2), a session-file flaw depthfirst says bypasses the PHP2Shell fix. The same releases fix PHP-FPM request smuggling (CVE-2026-129289), a PHP 8.5 use-after-free (CVE-2026-129474) and a session serializer mismatch (CVE-2026-115560), each CVSS v4.0 9.2. No exploitation of any of them is reported. These are the versions to run now.

Timeline at a glance

  1. 21 Oct 2026PHP fixes PHP2Shell (CVE-2026-109618, CVE-2026-109619, CVSS v4.0 9.2) in 8.5.12, 8.4.27, 8.3.36 and 8.2.35. (php.net)Not a breach
  2. 23 Oct 2026PHP informational advisory: disable session upload progress against a further, unlikely RCE vector (CVE-2026-115560). (php.net)Not a breach
  3. 26 Oct 2026CISA adds both CVEs to the Known Exploited Vulnerabilities catalog (due 29 Oct, forensic triage required). (CISA)Not a breach
  4. 18 Nov 2026SOCRadar reports an AI-agent-assisted PHP2Shell campaign: 404 compromised hosts, about 290,000 files exfiltrated. (SOCRadar)Reported
  5. 18 Nov 2026PHP announces further security releases for 19 November, highest severity CRITICAL. (php.net)Not a breach
  6. 19 Nov 2026PHP fixes phpAfterShell (CVE-2026-126714, CVSS v4.0 9.2) and other flaws in 8.5.13, 8.4.28, 8.3.37 and 8.2.36; depthfirst publishes its research. (PHP (GitHub))Not a breach
  7. 19 Nov 2026Same releases fix CVE-2026-129289 (PHP-FPM request smuggling), CVE-2026-129474 (PHP 8.5) and CVE-2026-115560, each CVSS v4.0 9.2; CISA enrichment: exploitation none. (CVE.org (CNA PHP))Not a breach

Last updated 21 November 2026. Every entry is dated and linked to its source; claims by attackers are labelled as claims, never stated as fact.

PHP incident timeline, in detail

Confirmed = acknowledged by PHP, a regulator filing or a court. Reported = credible reporting PHP has not fully confirmed. Unverified claim = an attacker or leak-site claim.

Oct 2026Not a breachProduct vulnerabilities, known exploited

PHP2Shell: two critical pre-authentication RCE flaws in PHP core

What happened. PHP's 21 October advisory covers CVE-2026-109618 (GHSA-w8hw-w9fx-j79w), where out-of-memory handling can leave request data partly initialised, and CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp), where request-owned state can survive after its memory is freed. Affected: 8.2.x before 8.2.35, 8.3.x before 8.3.36, 8.4.x before 8.4.27 and 8.5.x before 8.5.12, per the CVE records. PHP says all installations serving web requests are at risk, highest under Apache mod_php, and provided source backports for 7.4, 8.0 and 8.1.

Impact. Unauthenticated remote code execution. CISA lists both as known exploited (added 26 October 2026) and its enrichment says exploitation is active. PHP lists partial measures (memory_limit=-1, a low post_max_size, request limits at the web server, session.upload_progress.enabled=0) and says they do not make an installation safe.

Sources: php.net advisory · GHSA-w8hw-w9fx-j79w · GHSA-6wmf-4rv5-p3rp · CVE record · CISA KEV

Oct-Nov 2026ReportedExploitation campaign against PHP users (not against PHP)

SOCRadar: AI-agent-assisted campaign compromised 404 PHP servers

What happened. SOCRadar reconstructed one operator's campaign from its exposed servers: a first exploit script written on 21 October, the day public proofs of concept appeared; a queue of 39 AI agent workers backed by two self-hosted DeepSeek V4.1 endpoints; 595 targeted IPs in 57 countries; persistence through SSH keys, cron beacons, webshells and Dropbear tunnels.

Impact. SOCRadar counts 404 compromised hosts and about 290,000 exfiltrated files (9.5 GB) including cloud keys, application secrets, database backups and source code, plus about 3.3 million user records from an unauthenticated Redis instance. A payment-fraud track reached withdrawal capability without confirmed theft. The operator is not identified, and SOCRadar calls the campaign human-directed and AI-augmented, not fully autonomous.

Sources: SOCRadar, 18 Nov 2026

Nov 2026Not a breachProduct vulnerability

phpAfterShell (CVE-2026-126714): interrupted session writes lead to RCE

What happened. PHP's advisory GHSA-fm2m-fjf5-v3cp: the default files session handler wrote new session data over the old file without clearing it, so an interrupted write can leave parts of two sessions that a later session_start() reads back as attacker-influenced objects. Affected: 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13 (so the October PHP2Shell releases too); PHP says the code dates from PHP 4.1.0. depthfirst (Yuhang Wu), which named it, says an unauthenticated request can drive the write through session upload progress and that it bypasses the PHP2Shell fix.

Impact. Remote code execution where a suitable object chain exists; depthfirst chained it with a memory-corruption bug in an unnamed PHP-native class. CVSS v4.0 9.2 from PHP. CISA enrichment on 19 November: exploitation none; not in KEV. PHP's partial measures: disable session.upload_progress.enabled if unused, limit untrusted data in sessions, use a store that replaces records atomically. The same releases fix CVE-2026-129481, which PHP calls an incomplete fix for CVE-2026-109619.

Sources: GHSA-fm2m-fjf5-v3cp · CVE record · depthfirst, 19 Nov 2026 · PHP 8 ChangeLog

Nov 2026Not a breachProduct vulnerabilities (configuration-dependent)

PHP-FPM request smuggling (CVE-2026-129289), CVE-2026-129474 and CVE-2026-115560 fixed in the same release

What happened. Per the CVE records PHP published on 19 November: CVE-2026-129289 (GHSA-qc49-hpvq-g2w6), an unread request body left by an application that opens php://input can be parsed by PHP-FPM as a new FastCGI request when the front end reuses backend connections (for example nginx fastcgi_keep_conn on or Apache enablereuse=on, neither the default); affects PHP before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13. CVE-2026-129474 (GHSA-8mjj-2r7p-4hg2), a use-after-free in __call()/__callStatic() backtraces, affects PHP 8.5 before 8.5.13 only when zend.exception_ignore_args is off; PHP says php.ini-production prevents it. CVE-2026-115560 (GHSA-658j-r8rw-q6mx), a session serializer mismatch reached through session upload progress, affects the same ranges as CVE-2026-129289.

Impact. PHP rates each CVSS v4.0 9.2 and says CVE-2026-129289 can lead to execution of attacker-controlled PHP code by an unauthenticated attacker. CISA enrichment: exploitation none for all three, automatable yes for CVE-2026-129289. None is in KEV (checked 21 November 2026). The php-src source changes the built-in default of session.upload_progress.enabled from 1 to 0 in these releases.

Sources: CVE-2026-129289 · CVE-2026-129474 · CVE-2026-115560 · GHSA-qc49-hpvq-g2w6 · PHP 8 ChangeLog

Where the reports disagree

  • Dates: php.net's news posts and advisory are dated 21 October 2026; the PHP 8 ChangeLog dates the 8.5.12 release 22 October.
  • Which servers: PHP says PHP-FPM, mod_php, php-cgi, FrankenPHP and LiteSpeed are all at risk; SOCRadar says the operator's own exploit worked under mod_php and FrankenPHP and failed under FPM. That is one toolkit's limit, not a reason to skip FPM hosts.
  • Counts: SOCRadar's headline is 404 compromised hosts across both exposed directories; its count from the first set of collection jobs alone is about 393 unique hosts. All campaign figures are SOCRadar's; no victim has confirmed them.
  • Other firms have reported separate PHP2Shell activity by other actors. Those reports are not merged into SOCRadar's figures here.
  • phpAfterShell scope: PHP's CVE record lists only 8.2 to 8.5 ranges, while its advisory says the code dates from PHP 4.1.0 and depthfirst says unpatched 7.4, 8.0 and 8.1 builds keep the original behaviour. depthfirst's version table is dated 17 November and lists 8.4.28 and 8.5.13 release candidates as affected; PHP lists the final releases as patched.

The pattern across the record

Disclosure to mass exploitation in days

SOCRadar says the operator started on the day the fixes and public proofs of concept appeared. For flaws like this, patch windows are measured in days.

Vulnerabilities are not breaches

Nothing reported shows an intrusion at the PHP project. The exposure is to every organisation running an unpatched PHP web server.

What it means for PHP customers — and what to do

If you run PHP on internet-facing servers, the question is your PHP version and whether the host was exposed after 21 October, not whether PHP was breached.

  1. 1.Patch every PHP web server

    Move to 8.5.13, 8.4.28, 8.3.37 or 8.2.36 (or your distribution's fixed package), which fix both PHP2Shell and phpAfterShell, restart the web server and PHP-FPM, check the version the web server loads, not only the command line, and rebuild PHP container images.

    phpAfterShell: what to do
  2. 2.Hunt before you trust it

    Look for unfamiliar authorized_keys entries, cron beacons, PHP files you did not deploy, a rogue auto_prepend_file and a Dropbear server on localhost. Rebuild compromised hosts.

    Hunting checklist
  3. 3.Rotate what the host could read

    Cloud keys, .env secrets, database credentials, OAuth tokens and SSH keys, then review cloud logs back to 21 October.

    Key Rotation Planner
  4. 4.Check KEV and set the deadline

    Both CVEs are known exploited with a forensic-triage flag.

    KEV checker
Take this with you
Incident timeline · What PHP customers should do · Sources

CISO takeaways

Sources

Company statements and regulator filings first, then reputable reporting. Reviewed 21 November 2026.

  1. 1.Security advisory: critical remote code execution vulnerabilities, update now (and the 20 Oct, 23 Oct and 18 Nov notices) — php.net, 21 Oct 2026
  2. 2.GHSA-w8hw-w9fx-j79w (CVE-2026-109618) — PHP (GitHub php/php-src), 21 Oct 2026
  3. 3.GHSA-6wmf-4rv5-p3rp (CVE-2026-109619) — PHP (GitHub php/php-src), 21 Oct 2026
  4. 4.CVE-2026-109618 (CNA PHP Group, CISA enrichment) — CVE.org, 21 Oct 2026
  5. 5.CVE-2026-109618, CVSS v4.0 9.2 — NVD, 21 Oct 2026
  6. 6.Known Exploited Vulnerabilities catalog — CISA, 26 Oct 2026
  7. 7.GHSA-fm2m-fjf5-v3cp (CVE-2026-126714, phpAfterShell) — PHP (GitHub php/php-src), 19 Nov 2026
  8. 8.CVE-2026-126714 (CNA PHP Group, CISA enrichment) — CVE.org, 19 Nov 2026
  9. 9.phpAfterShell: From Interrupted Session Writes to Remote Code Execution — depthfirst, 19 Nov 2026
  10. 10.PHP 8 ChangeLog — php.net, 19 Nov 2026
  11. 11.CVE-2026-129289: PHP-FPM request smuggling through an unread HTTP request body (CNA PHP Group, CISA enrichment) — CVE.org, 19 Nov 2026
  12. 12.CVE-2026-129474: Use-after-free in magic method backtraces — CVE.org, 19 Nov 2026
  13. 13.CVE-2026-115560: Session serializer mismatch — CVE.org, 19 Nov 2026
  14. 14.PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign — SOCRadar, 18 Nov 2026

Frequently asked questions

Was PHP hacked?

No breach of php.net or the PHP project is reported. PHP2Shell is a pair of vulnerabilities in PHP, fixed on 21 October 2026.

Which PHP versions fix PHP2Shell?

8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP provided source backports for 7.4, 8.0 and 8.1; distributions ship their own patched packages. Run the 19 November releases (8.5.13, 8.4.28, 8.3.37, 8.2.36), which also fix phpAfterShell.

What is phpAfterShell?

CVE-2026-126714, a critical (CVSS v4.0 9.2) PHP session flaw named by depthfirst and fixed on 19 November 2026 in 8.5.13, 8.4.28, 8.3.37 and 8.2.36. An interrupted session-file write can leave data that a later request turns into attacker-influenced objects. No exploitation is reported.

What is CVE-2026-129289?

A PHP-FPM request smuggling flaw (CVSS v4.0 9.2 from PHP) fixed on 19 November 2026 in 8.5.13, 8.4.28, 8.3.37 and 8.2.36. It needs the web server to reuse FastCGI connections, for example nginx fastcgi_keep_conn on, which is not the default. No exploitation is reported. It is a flaw in PHP, not a breach of PHP.

Is PHP2Shell exploited?

Yes. CISA added both CVEs to KEV on 26 October 2026, and SOCRadar reported a campaign that compromised 404 hosts by its count.

Is there a workaround?

PHP lists partial measures but says only updating is a complete solution: there are no complete mitigations.

Our coverage of PHP

Same sourced, verification-tagged timeline, company by company — compare how peers have fared.

Or see the full Breach Index and how to read it.

Independent analysis for security-leadership education; not affiliated with or endorsed by PHP. Facts are attributed to the dated sources above, and anything disputed or unconfirmed is labelled as such. See the full Breach Index.