# php2shell: Two Critical Unauthenticated PHP RCE Flaws Exploited in the Wild (CVE-2026-109618, CVE-2026-109619)

> Two critical PHP core vulnerabilities, collectively named php2shell, allow unauthenticated remote code execution: CVE-2026-109618 via out-of-memory corruption and CVE-2026-109619 via stale request-owned global state. Both are CVSS v4.0 9.2, were fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on 2026-10-21, are exploited in the wild, and were added to CISA KEV on 2026-10-26.

- **Published:** 2026-11-19T21:50:37Z
- **Last reviewed:** 2026-11-19T21:50:37Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6502
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6502.png
- **ID:** TL-2026-6502
- **Severity:** CRITICAL (CVSS 9.2)
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 26 (3 shown free below)
- **CVEs:** CVE-2026-109618, CVE-2026-109619

## Description

php2shell is the name given to two memory-safety flaws in PHP core, discovered in August 2026 by Calif (Ryan Austin) and independently by Wiz as part of the OpenAI 'Patch the Planet' initiative, and fixed by the PHP project on 2026-10-21 (the release was pulled forward one day from 2026-10-22 after the CVE details leaked). Both are rated CVSS v4.0 9.2 (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H); NVD's primary CVSS 3.1 scores are 9.8 for CVE-2026-109618 and 8.1 for CVE-2026-109619. The PHP GHSAs list CWE-416, CWE-755, CWE-824, CWE-1325 and CWE-1419.

CVE-2026-109618 (GHSA-w8hw-w9fx-j79w) is out-of-memory corruption. PHP aborts a request with longjmp() on OOM; in some contexts request memory (for example a HashTable bucket whose element counters were incremented before the key allocation) is reachable before it is fully initialized, so request shutdown consumes an invalid structure. Attackers force the OOM with multipart requests that bypass post_max_size (chunked or length-less bodies), floods of multipart part headers, hundreds of empty-filename file parts that each create file metadata arrays, deeply nested field names, or oversized field names, while spraying the heap with forged structures (for example t[] form fields). The vector is highest-risk on Apache mod_php and FrankenPHP, where request shutdown runs even when startup fails; PHP-FPM workers exit on startup failure, which blocks the early path.

CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp) is stale global state. Error, session, object or extension state pointing into request-owned memory survives a fatal error (OOM or max execution time) and is consumed by a later request on the same worker before normal request initialization. Confirmed consumers are INI diagnostics raised during pre-initialization configuration (for example .htaccess or php_value settings on mod_php, PHP_VALUE FastCGI params on FPM) and session upload progress (enabled by default), which Akamai analyzes as a use-after-free in the progress handler's cached zval pointers reclaimed with 149 t[] fields of 288 bytes carrying a forged function structure that ends in system(). The PHP 8.5 fatal_error_backtraces path is the strongest demonstrated case for mod_php. Session-lifecycle RCE was validated against mod_php and PHP-FPM.

PHP states that no configuration change fully mitigates the flaws; the only complete fix is to update and restart all workers. Branches 8.1 and older are unsupported; PHP published minimal source backports for 7.4, 8.0 and 8.1, and distributions (Ubuntu, Red Hat, cPanel, CloudLinux) ship their own backports. A related informational advisory on 2026-10-23 (to be published as CVE-2026-115560) recommends keeping session.upload_progress.enabled=0 until the next bugfix release.

Exploitation: Amazon Threat Intelligence MadPot recorded an attempt on 2026-10-17 from a commercial anonymization service IP; Cloudflare reported early attacks on 2026-10-21; TU Delft's honeypots recorded the first PHP2Shell-like request at 2026-10-21 08:37 UTC and, through 2026-11-19, 89,575 exploitation requests from 802 source IPs in 337 ASNs, with 182 IPs sending code or a dropper. Observed payloads include OS commands, wget/curl droppers, session deserialization gadgets (Monolog), and scanner traffic self-identifying as php2shell-scan/109618. Arctic Wolf attributes some dropper infrastructure (92.118.112.100) to the Potassium botnet, a Mirai-derived family, though it did not observe the samples being fetched by PHP2Shell requests; TU Delft also captured a Mirai-derived DDoS bot, a Mirai 2.0.4_socks5 variant and a Nim implant (crong3-agent posing as sysmon). No named threat actor is attributed. Abstract Security claims a lab reproduction of RCE on a fully patched PHP 8.2.35 via session.upload_progress; this contradicts PHP's advisory and is unverified. Calif lists WordPress, Drupal, Joomla, MediaWiki, Roundcube, Magento, phpMyAdmin, Nextcloud, Laravel, Symfony and WHMCS as pre-auth exploitable applications. Vendors including Palo Alto Networks (PAN-OS/Panorama), Fortinet and Cisco reported products under assessment.

## MITRE ATT&CK

- T1595.002 Vulnerability Scanning
- T1190 Exploit Public-Facing Application
- T1059.004 Unix Shell
- T1082 System Information Discovery
- T1033 System Owner/User Discovery
- T1568 Dynamic Resolution
- T1036.005 Match Legitimate Resource Name or Location

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**php2shell Post-Exploitation: Web Worker Spawning Shell, Dropper and Discovery Commands** (`TL-2026-6502-SPL-002`)

Detects the php2shell post-exploitation process lineage: a PHP web worker (Apache mod_php/httpd, PHP-FPM, php-cgi, FrankenPHP, LiteSpeed) spawning sh -c or directly executing wget/curl/whoami/id/uname, including the PHP2SHELL_CONFIRMED command-execution test followed by a wget dropper download.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059.004, T1105, T1082, T1033, T1190
- **Data sources:** sysmon_for_linux, linux:auditd, defender_for_endpoint
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

````spl
index=linux sourcetype="sysmon:linux" EventCode=1 earliest=-24h
```Parent is a PHP web worker; php2shell RCE lands as sh -c or direct tool exec```
| where match(ParentImage, "(?i)/(apache2|httpd|php-fpm[0-9.]*|php-cgi[0-9.]*|frankenphp|lsphp[0-9]*|litespeed)$")
| where match(Image, "/(sh|bash|dash|busybox|wget|curl|whoami|id|uname)$")
| eval stage=case(match(CommandLine, "PHP2SHELL_CONFIRMED"), "exec_validation", match(CommandLine, "(wget|curl)"), "ingress_tool_transfer", match(CommandLine, "(^|[ ;|&])(whoami|id|uname)([ ;|&]|$)"), "user_system_discovery", 1==1, "shell_spawn")
| stats count AS events values(stage) AS stages values(CommandLine) AS commands values(Image) AS children BY host, ParentImage, User
| sort - events
````

### Microsoft KQL

```kql
let WebWorkers = @'(?i)^(apache2|httpd|php-fpm[0-9.]*|php-cgi[0-9.]*|frankenphp|lsphp[0-9]*|litespeed)$';
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName matches regex WebWorkers or InitiatingProcessParentFileName matches regex WebWorkers
| where (InitiatingProcessFileName matches regex WebWorkers and FileName in~ ('sh','bash','dash','busybox','wget','curl','whoami','id','uname'))
    or (InitiatingProcessParentFileName matches regex WebWorkers and InitiatingProcessFileName in~ ('sh','bash','dash') and FileName in~ ('wget','curl','whoami','id','uname'))
| extend Stage = case(ProcessCommandLine contains 'PHP2SHELL_CONFIRMED', 'exec_validation', ProcessCommandLine has_any ('wget','curl'), 'ingress_tool_transfer', FileName in~ ('whoami','id','uname'), 'user_system_discovery', 'shell_spawn')
| project Timestamp, DeviceName, AccountName, Stage, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessParentFileName
| order by Timestamp desc
```

### Sigma

```yaml
title: Web Worker Spawning Shell or Download Tool - php2shell Post-Exploitation
id: b3e40d97-6a21-4c5f-8e7d-91f2a4c0d5b8
status: experimental
description: Detects a PHP web worker (Apache, PHP-FPM, php-cgi, FrankenPHP, LiteSpeed) spawning a shell, wget/curl or user/system discovery commands, the post-exploitation lineage of php2shell (CVE-2026-109618 / CVE-2026-109619) including the PHP2SHELL_CONFIRMED test and wget dropper stage.
references:
    - https://arcticwolf.com/resources/blog/php2shell-critical-php-vulnerabilities-enable-unauthenticated-remote-code-execution/
    - https://php2shell.delftintellab.com/
author: Threadlinqs Team
date: 2026/11/19
tags:
    - attack.execution
    - attack.t1059.004
    - attack.discovery
    - attack.t1082
    - attack.t1033
    - attack.command-and-control
    - attack.t1105
    - cve.2026-109618
    - cve.2026-109619
logsource:
    category: process_creation
    product: linux
detection:
    selection_parent:
        ParentImage|endswith:
            - '/apache2'
            - '/httpd'
            - '/php-fpm'
            - '/php-cgi'
            - '/frankenphp'
            - '/litespeed'
            - '/lsphp'
    selection_shell:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
    selection_tools:
        Image|endswith:
            - '/wget'
            - '/curl'
            - '/whoami'
            - '/id'
            - '/uname'
    condition: selection_parent and (selection_shell or selection_tools)
falsepositives:
    - Legacy PHP applications that legitimately call shell_exec/system for admin tasks (backup, image conversion)
    - Control panels (cPanel, Plesk) invoking helper scripts from the web worker
level: high

```

**Known false positives:**

- Legacy PHP apps that call shell_exec/system for backups, image conversion or health checks
- Hosting control panels invoking helper scripts from PHP workers

**Tuning notes:** Baseline legitimate shell spawns per web host for 7-14 days and allowlist by exact CommandLine. Adjust sourcetype (sysmon:linux, auditd EXECVE) to your Linux telemetry. Raise priority when stage is exec_validation or ingress_tool_transfer, or when the shell command references /tmp, /dev/shm or /var/tmp.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- php2shell Exploitation Probes and PHP OOM Trigger Errors (Sentinel) (locked: unlock with TL Creds)
- php2shell Post-Exploitation: PHP Worker Process Lineage (Defender for Endpoint) (locked: unlock with TL Creds)
- php2shell Dropper/C2 Contact and Masqueraded Implants (Defender for Endpoint) (locked: unlock with TL Creds)
- php2shell Exploitation: Scanner UA, Session Poisoning and Dropper URLs (Sigma) (locked: unlock with TL Creds)
- php2shell Post-Exploitation: PHP Worker Spawning Shell, Dropper and Discovery Tools (Sigma) (locked: unlock with TL Creds)
- php2shell Payload C2: Dropper/Botnet Infrastructure and Sysmon-Masquerading Implant (Sigma) (locked: unlock with TL Creds)
- php2shell (CVE-2026-109618/109619) Exploitation Probes in Web Access Logs (locked: unlock with TL Creds)
- php2shell Dropper and Potassium/Mirai C2 Contact (Network and DNS) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 26)

Defanged, TLP:CLEAR.

- IP address: `92.118.112[.]100`
- Domain: `thunder[.]godofthunder[.]st`
- URL: `hxxps://pastebin[.]com/raw/wCYGVCBG`

Full set of 26 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [PHP Security advisory: Critical remote code execution vulnerabilities, update now](https://www.php.net/archive/2026.php)
- [GHSA-w8hw-w9fx-j79w (CVE-2026-109618)](https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w)
- [GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)](https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp)
- [NVD CVE-2026-109618](https://nvd.nist.gov/vuln/detail/CVE-2026-109618)
- [NVD CVE-2026-109619](https://nvd.nist.gov/vuln/detail/CVE-2026-109619)
- [CISA Known Exploited Vulnerabilities Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-109618)
- [watchTowr: CVE-2026-109618 Exploited Remote Code Execution in PHP (FAQ)](https://watchtowr.com/intelligence/php-cve-2026-109618-faq/)
- [watchTowr: PHP2Shell RCE Exploited (Rapid Reaction)](https://watchtowr.com/intelligence/php-remote-code-execution-php2shell/)
- [Calif: php2shell research write-up](https://calif.io/php2shell/)
- [Akamai: Understanding PHP2Shell](https://www.akamai.com/blog/security-research/understanding-php2shell-everything-you-need-to-know)
- [Arctic Wolf: PHP2Shell Critical PHP Vulnerabilities Enable Unauthenticated RCE](https://arcticwolf.com/resources/blog/php2shell-critical-php-vulnerabilities-enable-unauthenticated-remote-code-execution/)
- [Abstract Security: PHP2Shell Critical PHP RCE Vulnerabilities](https://www.abstract.security/blog/php2shell-critical-php-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619)
- [TU Delft: PHP2shell observations in the wild](https://php2shell.delftintellab.com/)
- [NCSC-NL: php2shell operational information and software status list](https://github.com/NCSC-NL/php2shell)
- [Ubuntu: php2shell vulnerability fixes available](https://ubuntu.com/blog/php2shell-vulnerability-fixes-available)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6502
