Skip to content
Speedchilli
Critical· 9.2Actively exploited

PHP2Shell: unauthenticated remote code execution in PHP

CVE-2026-109618 · CVE-2026-109619 · Updated

Two memory-safety flaws in PHP's core request handling let an unauthenticated attacker run code on a PHP server with a single crafted web request. One corrupts memory when a request runs out of memory part-way through setup. The other reuses state left behind by an earlier request after its memory has been freed. Both are being exploited. Upgrade straight to the 19 November releases, which also fix phpAfterShell.

Latest update · 19 November 2026

Further PHP security releases

PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 fix phpAfterShell, a related flaw that bypasses the October fix, and CVE-2026-129481, described as an incomplete fix for CVE-2026-109619. Upgrade to these.

Product
PHP 8.2 – 8.5 and end-of-life releases
Exploitation
Actively exploited. CISA added both CVEs to its KEV catalogue on 26 October 2026.
First published
23 November 2026
Last updated
19 November 2026

CVE-2026-109618

CWE-416, CWE-755, CWE-824, CWE-1325, CWE-1419

Remote code execution via out-of-memory corruption

  • CVSS 4.0: 9.2(PHP)CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVE-2026-109619

CWE-416, CWE-755, CWE-824, CWE-1325, CWE-1419

Remote code execution via stale global state

  • CVSS 4.0: 9.2(PHP)CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

What to do

  1. Upgrade PHP now

    Go straight to PHP 8.5.13, 8.4.28, 8.3.37 or 8.2.36 (or your distribution's equivalent) so you are also covered for phpAfterShell. Restart PHP-FPM or Apache so every worker runs the new version.

  2. Check for signs of compromise

    Exploitation has been seen in the wild, so check servers that ran a vulnerable version after 17 October. Look for PHP-FPM or Apache worker processes spawning shells (sh, bash), running id, or fetching files with wget or curl, and for new or changed files in web roots.

  3. If you truly cannot upgrade, reduce exposure

    PHP says these settings reduce exposure to specific attack paths but do not make an installation safe. Set them in php.ini or the FPM pool (not ini_set() or .user.ini), and restart all workers.

    ; CVE-2026-109619
    session.upload_progress.enabled = 0
    fatal_error_backtraces = 0        ; PHP 8.5 only
    
    ; CVE-2026-109618: keep request bodies small
    post_max_size = 8M                ; 32M if you need uploads
    ; and enforce body size, field, part and header limits at
    ; your proxy or web server, including for chunked requests

Who is affected

  • PHP is serving web requests. No login, user interaction or special configuration is required.
  • CVE-2026-109618: exploitation is confirmed against Apache mod_php with default memory and input limits. PHP says PHP-FPM is susceptible by source analysis, though no complete FPM exploit has been demonstrated.
  • CVE-2026-109619: confirmed through session upload progress (on by default, no session_start() needed) against both mod_php and PHP-FPM, and through fatal_error_backtraces on PHP 8.5.

Affected versions

  • PHP 8.5

    Affected: Before 8.5.12

    Fixed in: 8.5.12 (now use 8.5.13)

  • PHP 8.4

    Affected: Before 8.4.27

    Fixed in: 8.4.27 (now use 8.4.28)

  • PHP 8.3

    Affected: Before 8.3.36

    Fixed in: 8.3.36 (now use 8.3.37)

  • PHP 8.2

    Affected: Before 8.2.35

    Fixed in: 8.2.35 (now use 8.2.36)

  • PHP 7.4, 8.0, 8.1

    Affected: All

    Fixed in: No release. PHP published source backport branches; use a distro/LTS vendor build

  • PHP 7.3 and older

    Affected: All

    Fixed in: No fix

The October fixes are not enough on their own: the 19 November releases fix phpAfterShell (CVE-2026-126714) and CVE-2026-129481, which Cloudflare describes as an incomplete fix for CVE-2026-109619. PHP 8.2 reaches end of life on 31 December 2026.

Exploitation

  • CISA added both CVEs to its Known Exploited Vulnerabilities catalogue on 26 October 2026, with a 29 October deadline for US federal agencies.
  • Proof-of-concept code is public. watchTowr reports exploitation of both CVEs in its honeypots from 21 October. Amazon's MadPot sensors recorded an attempt on 17 October, before the patch.
  • Arctic Wolf reports widespread scanning and attempts to run commands and download second-stage tools.
  • CISA advises taking systems offline if they cannot be updated, and watching for PHP worker processes launching shells or downloading tools.

How to check

Which PHP version serves your website?

The PHP that serves web requests can differ from command-line PHP. Check PHP-FPM or Apache mod_php directly. The FPM binary name varies by distro.

php-fpm -v           # or php-fpm8.3 -v, etc.
apachectl -M 2>/dev/null | grep -i php   # mod_php loaded?

Mitigation settings

Shows the CLI values. Confirm the same values in your FPM pool and vhost config.

php -i | grep -E '^(session\.upload_progress\.enabled|fatal_error_backtraces|post_max_size)'

Updates

  1. Further PHP security releases

    PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 fix phpAfterShell, a related flaw that bypasses the October fix, and CVE-2026-129481, described as an incomplete fix for CVE-2026-109619. Upgrade to these.

  2. Added to CISA KEV

    CISA confirmed active exploitation of both CVEs and set a 29 October patch deadline for US federal agencies.

  3. PHP releases fixes

    PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 released with advisories GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp. Exploitation attempts were observed the same day.

  4. PHP announces an emergency security release

    PHP gave advance notice of a release for 21 October. Details leaked the same day.

Notes on sources

  • Some coverage quotes a CVSS 3.1 score of 9.8. PHP's own advisories give 9.2 under CVSS 4.0, which is what we use.
  • watchTowr calls the ini-file mitigations “ineffective”. PHP says they reduce exposure but are not a fix. Both agree that upgrading is the only complete fix.

References

Need a hand with this?

Our engineers can check your exposure, apply fixes through your change process and confirm the result.