Skip to content
DayZeroHub
Critical CVSS 9.2CVE-2026-129496

PHP: timezone cache use-after-free may allow remote code execution (CVE-2026-129496)

PHP Group PHP

Summary

PHP Group reports a use-after-free in PHP's timezone cache that can lead to remote code execution in certain deployments. The source assigns a CVSS 4.0 score of 9.2 (critical severity).

What happened

The vulnerability (CVE-2026-129496, also published as GHSA-gr4f-wgx5-jpfv; CWE-416 and CWE-459) affects non-thread-safe PHP builds. According to the source, when a diagnostic is written to a file-based error_log during module startup (for example, for an invalid date.timezone value or a session configuration warning), the timezone cache is allocated in startup memory that is later freed while a reference to it is kept. A diagnostic raised early in the first request of a worker, such as the max_input_vars warning, then accesses that freed cache. On such a deployment, an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php or CGI workers with a crafted request. The source adds that arbitrary code execution may be possible and has been demonstrated with known memory addresses.

Why it matters

The source describes a network attack vector requiring no authentication or user interaction, with high impact on confidentiality, integrity and availability. Its score is CVSS 4.0 9.2 (vector 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, issued by CNA:php), with critical severity. Attack complexity is rated high, and exploitation depends on a specific setup (a non-thread-safe build and diagnostics written to a file-based error_log during startup). The source does not state that the flaw is being actively exploited.

Affected products and versions

PHP (PHP Group): versions before 8.2.36; 8.3.x before 8.3.37 (from 8.3.0); 8.4.x before 8.4.28 (from 8.4.0); and 8.5.x before 8.5.13 (from 8.5.0). According to the description, non-thread-safe builds are affected.

ProductVersionsFixed in
PHP Group PHP8.5.x before 8.5.138.5.13
PHP Group PHP8.4.x before 8.4.288.4.28
PHP Group PHP8.3.x before 8.3.378.3.37
PHP Group PHP8.2.x before 8.2.368.2.36
PHP Group PHP< 8.2.36—
PHP Group PHP>= 8.3.0, < 8.3.37—
PHP Group PHP>= 8.4.0, < 8.4.28—
PHP Group PHP>= 8.5.0, < 8.5.13—

Action recommended by the source

The vendor publishes fixes in versions 8.2.36, 8.3.37, 8.4.28 and 8.5.13, per its release notes (https://www.php.net/ChangeLog-8.php) and the GitHub security advisory (https://github.com/php/php-src/security/advisories/GHSA-gr4f-wgx5-jpfv). The source does not state any alternative mitigations.

Fixed in: 8.2.36, 8.3.37, 8.4.28, 8.5.13

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-416, CWE-459

Relevant change history

  1. Advisory correction

    The preliminary version was replaced by the full write-up.

  2. Published

    Preliminary advisory published.

Summary written with AI assistance from the source data. See the sources and references for complete information. View sources