# phpAfterShell: PHP Session File Partial-Overwrite RCE Affecting Cisco Duo Access Gateway, Expressway, Expressway Select and URWB Unified Industrial Wireless Software - CVE-2026-126714

> CVE-2026-126714 (phpAfterShell) is a critical race condition in PHP's ext-session 'files' handler: an interrupted session write leaves a splice of new and old session data that is deserialized on the next session_start(), which can lead to remote code execution. Cisco confirmed that Duo Access Gateway, Expressway Series, Expressway Select Series and URWB Unified Industrial Wireless Software are affected; Cisco PSIRT is not aware of malicious use.

- **Published:** 2026-11-28T05:00:40Z
- **Last reviewed:** 2026-11-28T05:00:40Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7011
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7011.png
- **ID:** TL-2026-7011
- **Severity:** CRITICAL (CVSS 9.2)
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 12
- **CVEs:** CVE-2026-126714

## Description

On November 19, 2026 the PHP Foundation published GHSA-fm2m-fjf5-v3cp, 'Partially overwritten session files can lead to remote code execution' (CVE-2026-126714), rated Critical with a CVSS v4.0 base score of 9.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N). The weaknesses are CWE-367 (time-of-check time-of-use race condition) and CWE-662 (improper synchronization). The flaw is in PHP's ext-session: the default 'files' save handler (ps_files_write) overwrites an existing session file in place without truncating it first. If the write is interrupted, the file can contain a prefix of the new session data followed by a suffix of the old data. Crafted length fields can make the leftover bytes parse as session keys and serialized objects, which are instantiated on the next session_start(). If the application has a suitable gadget, or a memory-corruption bug in a PHP-native class can be reached, this yields code execution with the privileges of the PHP worker. The advisory says affected code dates back to PHP 4.1.0 based on code inspection.

The depthfirst write-up (Yuhang Wu, 'phpAfterShell: From Interrupted Session Writes to Remote Code Execution', November 19, 2026) describes this as follow-on research to the earlier 'php2shell' issues. The RFC1867 session upload-progress callback (php_session_rfc1867_update, reached from php_rinit_session) can open and rewrite a file-backed session before the target script runs, and pwrite() at offset 0 followed by ftruncate() is not atomic. Other trigger inputs named by the advisory are large user-controlled strings stored in sessions, and, in threaded builds, a hard memory-limit failure in another thread that ends the process mid-write. The researcher states that a working full chain exists (a demo video is linked), but the decoder and final heap layout are withheld for coordinated disclosure, and no exploit code has been published. The only proof object disclosed is a harmless stdClass with property proof set to pwned.

Affected PHP versions per the GHSA: all releases before 8.2.36, 8.3.x before 8.3.37, 8.4.x before 8.4.28 and 8.5.x before 8.5.13; patched releases are 8.2.36, 8.3.37, 8.4.28 and 8.5.13. depthfirst's table (as of November 17, 2026) additionally marks 8.4.27, 8.5.12, 8.6.0RC4 onward and master as vulnerable variants and the official 7.4/8.0/8.1 EOL mitigation branches as not vulnerable; this differs slightly from the GHSA, which does not list 8.6. The temporary mitigation is to disable session.upload_progress.enabled.

Cisco published cisco-sa-phpaftershell-nov-2026-kT9pL4Xe ('Vulnerability in PHP Affecting Cisco Products: November 2026', severity Critical, first published 2026-11-23, v1.1 interim updated 2026-11-24). Affected products and fixed releases: Cisco Duo Access Gateway fixed in 3.3.0 (which raises the bundled PHP from 8.3.36 to 8.3.37; the Linux build also disables the unused PHP session upload progress feature); Cisco Expressway Series and Expressway Select Series (bug CSCwx94499) fixed in X15.6 with the date TBD; Cisco URWB Unified Industrial Wireless Software (bug CSCwx94501) fixed in 26.2.1b (Dec 2026, estimate) and 27.1.1 (Mar 2027, estimate). Cisco lists no workarounds, and states that its PSIRT is not aware of any public announcements or malicious use of the vulnerability. Catalyst Center, Catalyst SD-WAN, ISE, IOS XE, IOS XR, Nexus Dashboard, NX-OS, Secure Firewall ASA/FMC/FTD, UCS Central and UCS Director are listed as not affected. GovCERT.HK alert A26-11-54 (2026-11-24) warns that successful exploitation could lead to remote code execution and tampering on an affected system. Splunk advisory SVD-2026-1113 (2026-11-20) covers 19 PHP CVEs including this one, names no affected Splunk products, and lists most of its product line as unaffected.

Note on sourcing: no source reports in-the-wild exploitation, public PoC code, a named threat actor, or network/file-hash indicators. The IOC list below therefore contains only sourced technical artefacts for hunting and exposure assessment (affected products, code and function names, file path patterns, configuration settings, version strings), not attacker infrastructure. No network IOCs exist, so BeaconBeagle correlation was not applicable.

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1059 Command and Scripting Interpreter
- T1565 Data Manipulation
- T1565.001 Stored Data Manipulation

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

**phpAfterShell CVE-2026-126714 - PHP Web Worker Spawning Shell** (`TL-2026-7011-SPL-002`)

Detects php-fpm, php-cgi, httpd, apache2 or w3wp spawning sh, bash, cmd.exe or PowerShell. After a CVE-2026-126714 (phpAfterShell) spliced session file is deserialized on session_start(), a working gadget chain yields code execution with the privileges of the PHP worker, and a shell child process is the most reliable observable. Covers Linux (Sysmon for Linux) and Windows (Sysmon) hosts, including the Windows build of Duo Access Gateway.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059, T1059.004, T1190
- **Data sources:** sysmon:linux (EventCode 1), XmlWinEventLog:Microsoft-Windows-Sysmon/Operational (EventCode 1), Microsoft Defender for Endpoint (DeviceProcessEvents)
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

````spl
```PHP worker spawning a shell - post-exploitation after CVE-2026-126714 phpAfterShell session object injection```
((index=linux sourcetype="sysmon:linux") OR (index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational")) (EventCode=1 OR EventID=1) earliest=-24h
| where match(ParentImage,"(?i)(^|[^a-z0-9_-])(php-fpm[0-9.]*|php-cgi([.]exe)?|httpd([.]exe)?|apache2|w3wp[.]exe)$")
| where match(Image,"(?i)[^a-z0-9_.-](sh|bash|dash|zsh|ksh|cmd[.]exe|powershell[.]exe|pwsh[.]exe)$")
| stats count min(_time) AS first_seen max(_time) AS last_seen values(CommandLine) AS cmdlines values(User) AS users by host, ParentImage, Image
| convert ctime(first_seen) ctime(last_seen)
| sort - count
````

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName startswith "php-fpm" or InitiatingProcessFileName in~ ("php-cgi", "php-cgi.exe", "httpd", "httpd.exe", "apache2", "w3wp.exe")
| where FileName in~ ("sh", "bash", "dash", "zsh", "ksh", "cmd.exe", "powershell.exe", "pwsh.exe")
| summarize Executions = count(), FirstSeen = min(Timestamp), CommandLines = make_set(ProcessCommandLine, 10) by DeviceName, InitiatingProcessFileName, FileName, AccountName
| project FirstSeen, DeviceName, InitiatingProcessFileName, FileName, AccountName, Executions, CommandLines
```

### Sigma

```yaml
title: PHP Worker Spawns Shell - Post-Exploitation After phpAfterShell
id: 5b1d0c2e-7a41-4f0e-9a51-7011a0000002
status: experimental
description: Detects a PHP web worker (php-fpm, php-cgi, httpd, apache2) spawning a Unix shell, the typical result of PHP object injection reaching code execution in CVE-2026-126714.
references:
    - https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp
    - https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-phpaftershell-nov-2026-kT9pL4Xe
    - https://depthfirst.com/research/phpaftershell
author: Threadlinqs Team
date: 2026/11/28
tags:
    - attack.execution
    - attack.t1059
    - attack.t1059.004
    - attack.initial-access
    - attack.t1190
    - cve.2026.126714
logsource:
    category: process_creation
    product: linux
detection:
    selection_worker:
        ParentImage|contains: '/php-fpm'
    selection_worker2:
        ParentImage|endswith:
            - '/php-cgi'
            - '/httpd'
            - '/apache2'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/zsh'
    condition: (selection_worker or selection_worker2) and selection_child
falsepositives:
    - Legacy PHP applications using exec(), system() or shell_exec() for administration tasks
    - Cisco-bundled management scripts launched through PHP
level: high

```

**Known false positives:**

- Legacy PHP admin panels deliberately calling shell_exec() or system()
- Deployment or maintenance scripts launched by the web server user

**Tuning notes:** Allow-list fixed CommandLine values produced by your own applications. Keep alerting on any shell carrying network, encoding or interpreter arguments. Pair with KQL-002 (PHP file drops by the worker) for webshell persistence coverage.

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

- phpAfterShell CVE-2026-126714 - PHP Worker Crashes and Memory-Limit Failures (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - PHP Worker Dropping PHP Files (Webshell Persistence) (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - PHP Worker Rare Outbound Connection to Public IP (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - PHP_SESSION_UPLOAD_PROGRESS Trigger Field in Requests (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - Non-PHP Process Writing sess_ Session Files (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - PHP Worker DNS Lookups to Non-Corporate Domains (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - Aborted POST Burst Against PHP Endpoints (locked: unlock with TL Creds)
- phpAfterShell CVE-2026-126714 - Reverse Shell and Downloader Launched by PHP Worker (locked: unlock with TL Creds)

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

## Sources

- [Security Alert (A26-11-54): Vulnerability in Cisco Products - GovCERT.HK](https://www.govcert.gov.hk/en/alerts_detail.php?id=2209)
- [Cisco Security Advisory: Vulnerability in PHP Affecting Cisco Products: November 2026](https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-phpaftershell-nov-2026-kT9pL4Xe)
- [Cisco CSAF: cisco-sa-phpaftershell-nov-2026-kT9pL4Xe](https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-phpaftershell-nov-2026-kT9pL4Xe/csaf/cisco-sa-phpaftershell-nov-2026-kT9pL4Xe.json)
- [PHP GHSA-fm2m-fjf5-v3cp: Partially overwritten session files can lead to remote code execution](https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp)
- [depthfirst: phpAfterShell - From Interrupted Session Writes to Remote Code Execution](https://depthfirst.com/research/phpaftershell)
- [Splunk SVD-2026-1113: Vulnerabilities in PHP affecting Splunk Products - November 2026](https://advisory.splunk.com/advisories/SVD-2026-1113)
- [Duo Access Gateway release notes (version 3.3.0)](https://duo.com/docs/dag-notes)
- [MITRE CVE record CVE-2026-126714](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-126714)

## 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-7011
