# CVE-2026-109619: PHP core use-after-free allows unauthenticated RCE (php2shell)

A use-after-free in PHP core lets remote attackers run code as the web worker (CVSS 4.0 9.2). Public exploit code exists and Sophos saw scanning and failed attempts; successful exploitation is not confirmed.

- Vendor: PHP Group, PHP (php-src) core, php2shell
- Severity: CRITICAL (CVSS 4.0 9.2)
- Exploited (CISA KEV): yes, added 2026-10-26
- EPSS: 100.0% on 2026-11-23
- Public exploit: yes
- Patch available: yes
- Vendor advisory: https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
- Published: 2026-10-21; updated: 2026-10-23
- Page: https://patchtonight.com/breaking/CVE-2026-109619/

## Affected and fixed versions

| Affected | Fixed in |
| --- | --- |
| PHP 8.5 | 8.5.12 or later |
| PHP 8.4 | 8.4.27 or later |
| PHP 8.3 | 8.3.36 or later |
| PHP 8.2 | 8.2.35 or later |
| Older, unsupported PHP | No fix from the PHP project. The CVE record lists only 8.2 to 8.5, but Wiz says older versions are also exposed to related bugs. Upgrade to a supported branch |

## Why this matters

PHP runs on roughly 70% of websites (Wiz's figure), behind WordPress, Drupal, Joomla and countless custom apps. This flaw is in PHP itself, not in an application, so a simple site on an unpatched version can be exposed. PHP isn't a vendor PatchTonight tracks, but every team that runs a PHP web server will be asked about it. **It is not in CISA KEV** (catalog 2026.10.21). EPSS is 5.8% (93rd percentile) on 2026-10-22.

Reports of exploitation conflict (see below), so this is "patch now", not "you are already breached".

## What it is

PHP keeps some global state that points into memory owned by the current request. When a request ends, that state may not be reset correctly, or may be filled in again after the reset. The next request on the same worker can then read or branch on a **freed pointer** (CWE-416, use after free) before PHP has initialized it. Per the advisory, the confirmed impact is memory disclosure and **remote code execution with the web worker's privileges**, with no login. CVSS 4.0 is 9.2; the vector has high attack complexity.

CVE-2026-109619 is the second half of the "php2shell" pair. Wiz, who found them, ties it to the fatal-error backtrace use-after-free and an OPcache type confusion. Its sibling, CVE-2026-109618, covers the session upload-progress unserializer and a process-memory disclosure. Wiz chained these into unauthenticated RCE against default WordPress, Drupal and Joomla container images.

**Exploitation status is disputed:**

- Sophos said public exploit code is available. It first reported successful exploitation, then corrected itself: its customers saw scanning and a few failed attempts, and the payload was blocked.
- Recorded Future, quoting Patchstack and Cloudflare, says attacks and exploitation incidents were seen on 21 October. We could not open those primary reports.
- Huntress saw none on its partners as of 21 October. Elastic said there was no reliable public PoC that works end to end. Recorded Future says public PoC repositories vary in quality and it hasn't tested them.
- The CVE record lists exploitation as "none" (CISA SSVC data).

## Am I affected?

You are affected if you run PHP **8.2 before 8.2.35, 8.3 before 8.3.36, 8.4 before 8.4.27 or 8.5 before 8.5.12** and PHP handles web requests. The advisory says exposure depends on the server API and configuration:

- **Apache mod_php:** confirmed RCE through the fatal-error backtrace path.
- **PHP-FPM:** conditional. It applies when the front end sends `PHP_VALUE` or `PHP_ADMIN_VALUE` parameters that trigger an early diagnostic. Session upload progress was shown to work against FPM with a normal dynamic pool.
- **LSAPI:** a possible candidate that the advisory does not rule out.
- **FrankenPHP:** no entry point found in the default configuration, but the advisory says that does not make it immune.

Don't count on these conditions to protect you. PHP's own announcement says "all PHP installations serving web requests" should update.

**Check your version** on each web server, container and image:

```
php -v
```

Also check PHP bundled inside vendor appliances and control panels (Huntress recommends a full inventory). The version a CLI reports can differ from the one your web server loads, so check the web SAPI too.

Older PHP versions are not in the CVE record's affected list, but Wiz says related bugs reach back to PHP 5.4. Treat unsupported PHP as exposed.

## What to do

1. **Upgrade** to PHP **8.5.12, 8.4.27, 8.3.36 or 8.2.35** (or later on your branch). PHP says updating is the only reliable mitigation. Rebuild container images and restart PHP-FPM or Apache so the new binary is loaded.
2. **If you can't upgrade tonight**, apply the advisory's partial mitigations and restart every worker:
   - On PHP 8.5, set `fatal_error_backtraces=0`.
   - Set `session.upload_progress.enabled=0`. The advisory suggests keeping it off after patching if you don't need the feature.
   - Reduce attacker-reachable fatal errors. The advisory also mentions `pm.max_requests=1`, and says to treat execution timeouts as fatal errors.
   - Put a WAF in front. Recorded Future lists these as stopgaps, not substitutes for patching.
3. **Unsupported PHP:** migrate to a supported branch. Until then, Huntress advises setting `session.upload_progress.enabled = Off` in `php.ini` and isolating or firewalling the host.
4. **Read the related advisory** [GHSA-w8hw-w9fx-j79w](https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w), which the PHP advisory says to follow too.
5. **If you were exposed while vulnerable**, hunt (below) from 20 October 2026. Recorded Future suggests looking back further. If you find a shell or unknown binary, rebuild the host and rotate secrets the web user could read, such as database passwords, API keys and `.env` files.

## Detection

The published indicators are few, so hunt for **behavior**:

- **PHP spawning other processes:** `php-fpm`, `apache2` or `nginx` workers starting shells, `curl`, `wget`, or reverse-shell patterns such as `/dev/tcp/`, `fsockopen` and `mkfifo` (Huntress, Elastic). Also look for files created or run by the web user in `/tmp`.
- **The Sophos-observed payload:** a download from `92.118.112.100`, a file `/tmp/nfs` run as `./nfs php`, and the user agent `php2shell-scan/109618`. See the indicators section for the rest.
- **Crash signs (Wiz):** unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, unusually large or malformed `PHPSESSID` cookies, and unexplained PHP worker restarts.
- **Sophos products:** IPS signatures 67359, 67360, 67375 and 2313184 to 2313189 are listed in Sophos's post.
- **Elastic** lists rules for payload execution by a web server and suspicious web server child processes in its detection post.

## Sources

- [PHP security advisory GHSA-6wmf-4rv5-p3rp](https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp)
- [CVE record](https://cveawg.mitre.org/api/cve/CVE-2026-109619)
- [PHP announcement on oss-security (Jakub Zelenka)](http://www.openwall.com/lists/oss-security/2026/10/21/7)
- [PHP 8.2.35 release notice](https://www.php.net/releases/8_2_35.php)
- [CISA Known Exploited Vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)
- [Wiz, php2shell](https://www.wiz.io/blog/php2shell-php-rce)
- [Sophos, exploit released and IOCs](https://www.sophos.com/en-us/blog/proof-of-concept-exploit-released-for-php-vulnerabilities-109618-109619)
- [Huntress, rapid response](https://www.huntress.com/blog/php2shell-leaked-critical-php-vulnerabilities)
- [Recorded Future Insikt Group](https://www.recordedfuture.com/blog/php2shell-vulnerability-exploitation)
- [Elastic Security Labs, detection coverage](https://www.elastic.co/security-labs/threat-command/php2shell-php-rce-detection)

---

Data from PatchTonight (https://patchtonight.com), compiled from vendor advisories, CISA KEV and FIRST EPSS. Please credit PatchTonight and link to the CVE page when you use it.
