# PHP Three Critical Vulnerabilities: CVE-2026-129474, CVE-2026-129496, CVE-2026-115560 (use-after-free x2, session serializer mismatch)

> The PHP project fixed three critical flaws on 2026-11-19 that can lead to remote code execution as the PHP process: a magic-method backtrace use-after-free (PHP 8.5 only), a timezone-cache use-after-free (all supported branches) and a session upload-progress serializer mismatch. Fixes ship in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36; no in-the-wild exploitation of these three CVEs is reported in the sources reviewed.

- **Published:** 2026-11-20T20:25:24Z
- **Last reviewed:** 2026-11-20T20:25:24Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6617
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6617.png
- **ID:** TL-2026-6617
- **Severity:** CRITICAL (CVSS 9.2)
- **Category:** VULNERABILITY
- **Status:** PATCHED
- **Detections:** 9 (1 shown free below) · **IOCs:** 8
- **CVEs:** CVE-2026-129474, CVE-2026-129496, CVE-2026-115560

## Description

CVE-2026-129474 (GHSA-8mjj-2r7p-4hg2, Core, CWE-416) affects PHP >= 8.5.0 and < 8.5.13. PHP can access freed memory when collecting the arguments of a method handled by __call() or __callStatic() for a backtrace; a backtrace taken during that interval can collect values left behind by an earlier call instead of the current arguments. The advisory states that remote code execution has been confirmed on PHP 8.5 and later. Documented workarounds are zend.exception_ignore_args=1 or fatal_error_backtraces=0 (PHP 8.5+) in the configuration used by the FPM/web workers, followed by a restart; display_errors=0 does not prevent the backtrace from being built.

CVE-2026-129496 (GHSA-gr4f-wgx5-jpfv, ext-date, CWE-416 and CWE-459 Incomplete Cleanup) affects PHP < 8.2.36, 8.3.x < 8.3.37, 8.4.x < 8.4.28 and 8.5.x < 8.5.13. PHP can retain a reference to a freed timezone cache when a diagnostic is written to a PHP error log file during process startup; the memory is released at the end of startup but the internal reference remains until the date extension initializes the first request. If another warning occurs during an early request, workers may crash or mishandle memory, and the advisory says an unauthenticated remote attacker may be able to crash PHP workers or execute arbitrary code with their privileges. The advisory says the code has been present since PHP 5.3.18 and 5.4.8 (based on code inspection). Mitigation: correct configuration errors and deprecated settings that produce startup diagnostics, restart the master process and all workers, or send PHP errors to a destination such as syslog.

CVE-2026-115560 (GHSA-658j-r8rw-q6mx, ext-session, CWE-20 and CWE-502) affects the same four branches below the same fixed versions. PHP's session upload-progress feature can write attacker-controlled data using one session serialization format and later read it using another; if the output is read as the php handler, an attacker-supplied delimiter can cause bytes inside the key to reach PHP's unserialization machinery. Per Aikido and The Register, an application is exposed only if session.serialize_handler is php_binary or php_serialize and application code switches it to php with ini_set() before session_start(), and session upload progress is enabled (PHP's default). The PHP Foundation described this as requiring a very unlikely combination of configuration and application code, and Sonatype notes a gadget-bearing application is needed for code execution. Impact per the advisory: remote code execution, file modification, session corruption or denial of service. PHP published an informational advisory on 2026-10-21/23 with the mitigation session.upload_progress.enabled=0, applied administratively (php.ini, FPM pool or server config) before request parsing, not via ini_set() or .user.ini. If upload progress must stay enabled, all readers and writers of the session store must use the same serialize_handler, even after patching.

All three advisories were published by PHP on 2026-11-19 with CVSS v4.0 9.2 (AV:N/AC:H/AT:P). The advisory pages carry a note that the reports were submitted with AI assistance. Sources reviewed report no in-the-wild exploitation, public PoC, IOCs or attribution for these three CVEs. They are separate from the October 'PHP2Shell' flaws (CVE-2026-109618 and CVE-2026-109619, fixed in 8.5.12/8.4.27/8.3.36/8.2.35), for which The Register reported mass exploitation attempts and public PoCs; the October releases do not fix CVE-2026-115560. Aikido states PHP 8.1, 8.0, 7.x and 5.x should be treated as affected with no upstream fix, and that PHP 8.2 reaches end of life on 2026-12-31. The same release also fixed other issues (for example CVE-2026-129289 FPM request smuggling, CVSS 9.2 per Aikido, CVE-2026-126714 partially overwritten session files, CVE-2026-129481 session shutdown use-after-free), so upgrading is preferred over the config workarounds, which do not cover every critical issue. Upstream release notes give no explicit affected-version table in the Sonatype article; affected ranges here come from the GHSA advisories.

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1059 Command and Scripting Interpreter
- T1499.004 Endpoint Denial of Service: Application or System Exploitation
- T1565.001 Data Manipulation: Stored Data Manipulation

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

**PHP / Web Worker Spawning Shell or Downloader — Post-Exploitation (CVE-2026-129474, CVE-2026-115560)** (`TL-2026-6617-SPL-002`)

Detects php-fpm, php-cgi, php or Apache workers spawning sh/bash/curl/wget/nc/python/perl via Sysmon for Linux process creation. A successful RCE as the PHP process from CVE-2026-129474, CVE-2026-129496 or the CVE-2026-115560 session-unserialize chain would typically pivot to a shell or fetch a second stage (T1059.004, T1190, T1505.003).

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1059, T1059.004, T1505.003
- **Data sources:** sysmon_linux, linux_auditd
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=linux sourcetype="sysmon:linux" EventCode=1 (ParentImage="*/php-fpm*" OR ParentImage="*/php-cgi" OR ParentImage="*/php" OR ParentImage="*/apache2" OR ParentImage="*/httpd") (Image="*/sh" OR Image="*/bash" OR Image="*/dash" OR Image="*/curl" OR Image="*/wget" OR Image="*/nc" OR Image="*/ncat" OR Image="*/python*" OR Image="*/perl") | stats count min(_time) AS first_seen values(CommandLine) AS command_lines BY host ParentImage Image User | convert ctime(first_seen)
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName startswith "php-fpm" or InitiatingProcessFileName in~ ("php","php-cgi","apache2","httpd")
| where FileName in~ ("sh","bash","dash","curl","wget","nc","ncat","python","python3","perl")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine
```

### Sigma

```yaml
title: PHP Worker Spawning Shell Or Download Utility After PHP RCE (CVE-2026-129474 CVE-2026-115560)
id: c4b2d8f3-6e50-4b9c-8d72-3a8f1b2e4c02
status: experimental
description: Detects a PHP or web-server worker spawning a shell, interpreter or download utility, the expected post-exploitation behaviour after memory-corruption or deserialization RCE as the PHP process.
references:
    - https://github.com/php/php-src/security/advisories/GHSA-8mjj-2r7p-4hg2
    - https://github.com/php/php-src/security/advisories/GHSA-gr4f-wgx5-jpfv
    - https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx
    - https://www.sonatype.com/blog/php-discloses-three-new-critical-vulnerabilities
author: Threadlinqs Team
date: 2026/11/20
tags:
    - attack.initial-access
    - attack.t1190
    - attack.execution
    - attack.t1059.004
    - attack.persistence
    - attack.t1505.003
    - cve.2026.129474
    - cve.2026.129496
    - cve.2026.115560
logsource:
    product: linux
    category: process_creation
detection:
    selection_parent:
        ParentImage|contains:
            - '/php-fpm'
            - '/php-cgi'
            - '/php'
            - '/apache2'
            - '/httpd'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/curl'
            - '/wget'
            - '/nc'
            - '/ncat'
            - '/python3'
            - '/perl'
    condition: selection_parent and selection_child
falsepositives:
    - Applications that legitimately shell out (image processing, PDF generation, git hooks)
    - Admin PHP CLI scripts run from cron or terminals
level: high

```

**Known false positives:**

- Legitimate apps invoking shell utilities via exec/shell_exec (ImageMagick, wkhtmltopdf)
- Deployment tooling run under the web user

**Tuning notes:** Baseline known parent/child pairs per host and add them to an allowlist (CommandLine prefix); keep alerting for curl/wget/nc/python spawned by php-fpm; swap the sourcetype if using auditd EXECVE instead of Sysmon for Linux.

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

- PHP Session Decode / Unserialize Error Spike — Serializer Mismatch Abuse (CVE-2026-115560) (locked: unlock with TL Creds)
- PHP Worker Staging Script or Binary in Temp Directory — Post-Exploitation (CVE-2026-129474, CVE-2026-115560) (locked: unlock with TL Creds)
- PHP Worker Outbound Connection to Public IP on Non-Standard Port — C2 / Reverse Shell (CVE-2026-129474, CVE-2026-115560) (locked: unlock with TL Creds)
- PHP Session File Modified by Shell or Interpreter — Session Store Tampering (CVE-2026-115560) (locked: unlock with TL Creds)
- PHP Worker Creating PHP File in Web Root — Web Shell Persistence (CVE-2026-129474, CVE-2026-115560) (locked: unlock with TL Creds)
- PHP Startup Diagnostics in Error Log — CVE-2026-129496 Exposure Condition (Timezone Cache UAF) (locked: unlock with TL Creds)
- PHP-FPM Worker Crash Burst — Use-After-Free Exploitation Attempt (CVE-2026-129496 / CVE-2026-129474) (locked: unlock with TL Creds)
- C2 / Second-Stage Download From Community-Related PHP2Shell Sibling Infrastructure (CVE-2026-115560 context) (locked: unlock with TL Creds)

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

## Sources

- [PHP Discloses Three New Critical Vulnerabilities (Sonatype Research Team)](https://www.sonatype.com/blog/php-discloses-three-new-critical-vulnerabilities)
- [PHP ChangeLog (8.x)](https://www.php.net/ChangeLog-8.php)
- [GHSA-8mjj-2r7p-4hg2: Use-after-free in magic method backtraces (CVE-2026-129474)](https://github.com/php/php-src/security/advisories/GHSA-8mjj-2r7p-4hg2)
- [GHSA-gr4f-wgx5-jpfv: Timezone cache use-after-free (CVE-2026-129496)](https://github.com/php/php-src/security/advisories/GHSA-gr4f-wgx5-jpfv)
- [GHSA-658j-r8rw-q6mx: Session serializer mismatch (CVE-2026-115560)](https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx)
- [PHP security release 19 November 2026 / CVE-2026-115560 (Aikido)](https://www.aikido.dev/blog/php-security-release-19-november-2026-cve-2026-115560)
- [There's a third PHP2Shell bug but it won't get an emergency fix (The Register)](https://www.theregister.com/security/2026/10/23/theres-a-third-php2shell-bug-but-it-wont-get-an-emergency-fix/5305208)
- [PHP.net news archive 2026 (informational advisory for CVE-2026-115560)](https://www.php.net/archive/2026.php#2026-10-23-1)

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