phpAfterShell and six other PHP critical flawsPatch

CVE-2026-126714 · CVE-2026-129289 · CVE-2026-115560 · CVE-2026-129496 · CVE-2026-129481 · CVE-2026-129474 · CVE-2026-129182

PHP published 17 security advisories on November 19, 2026, including seven critical flaws such as phpAfterShell; several can lead to code execution in specific configurations.

Ultima revisione

Aggiornamenti

  1. PHP released 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0 (si apre in una nuova scheda) with fixes for 17 security advisories, and depthfirst published its phpAfterShell research (si apre in una nuova scheda).

Panoramica

Dettagli

On November 19, 2026, PHP released 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0 with fixes for 17 security advisories: seven rated critical (CVSS v4.0 9.2), four high and six medium. This briefing covers the seven critical flaws. In its advance notice, PHP said the critical issues require either non-default configuration or uncommon setups.

phpAfterShell (CVE-2026-126714) is in PHP's default file-based session handler. If a session write is interrupted, the file can keep the start of the new session and the end of the old one. The next session_start() can then deserialize objects an attacker placed there. Session upload progress is one way for a remote client to shape the stored data, and applications that store large user-controlled strings in sessions are another. PHP's advisory says code execution also needs an interruption at a useful point and a suitable deserialization gadget chain in the application.

depthfirst says it discovered and reported phpAfterShell; the CVE record credits Leo Lin and Asahi as reporters. depthfirst reports that it reached code execution without an application gadget class by chaining a second, undisclosed memory corruption bug in a PHP-native class. The sources reviewed do not establish whether that second bug is fixed in these releases.

CVE-2026-129289 lets an unauthenticated attacker smuggle a second FastCGI request into PHP-FPM and run PHP code as the worker. PHP says this needs a front end that reuses backend connections, such as nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on or HAProxy, and an application path that opens php://input without reading it to the end. The demonstrated attack also needs the path of an existing PHP script. Front ends that close the FastCGI connection after each request are not affected by it. LSAPI shares the cleanup bug, but PHP does not establish code execution there.

CVE-2026-115560, the session serializer mismatch covered in the php2shell briefing, is now fixed, and the fix turns session upload progress off by default. PHP's November 19 advisory widens its scope: no runtime serializer change is needed when separate applications, pools or command-line jobs with different serializers share a session store. CVE-2026-129481 is a use-after-free in PHP 8.3 and later that PHP describes as an incomplete fix for CVE-2026-109619; PHP has not demonstrated code execution through it.

CVE-2026-129496 is a use-after-free in non-thread-safe builds. An unauthenticated attacker can crash a fresh worker, and possibly run code, when a startup diagnostic has been written to a PHP error log file. PHP's advisory says code execution was demonstrated locally in PHP-FPM and Apache mod_php with known memory addresses.

CVE-2026-129474 and CVE-2026-129182 are use-after-free bugs in fatal error backtraces, which PHP 8.5 enables by default. Both affect PHP 8.5, and PHP says CVE-2026-129474 also affects later versions. For CVE-2026-129474, PHP notes that the zend.exception_ignore_args=1 setting in php.ini-production blocks the demonstrated attack path. CVE-2026-129182 also needs specific path-level settings and an Apache per-directory configuration or front end that produces an early diagnostic. PHP has not demonstrated code execution through it.

On November 19, 2026, none of the 17 vulnerabilities was in CISA's Known Exploited Vulnerabilities catalog, and no source reviewed reports exploitation in the wild. CISA does list CVE-2026-109618 and CVE-2026-109619 from the October php2shell release. Two of today's critical fixes, for CVE-2026-129481 and CVE-2026-129182, close gaps left by the fix for CVE-2026-109619.

Rischio

No source reviewed on November 19, 2026 reports exploitation in the wild. PHP says phpAfterShell affects its default session handler; CVE-2026-129289 allows unauthenticated code execution with FastCGI connection reuse.

Deployment interessati

PHP 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28, 8.5 before 8.5.13. PHP 8.6.0 contains all 17 fixes; depthfirst and PHP confirm that 8.6.0 release candidates were affected by phpAfterShell and CVE-2026-129474. Whether a deployment is exposed depends on the conditions of each flaw, described in the details.

PHP 8.1 and earlier are end of life. depthfirst says the official 7.4, 8.0 and 8.1 end-of-life mitigation branches are not affected by phpAfterShell. PHP's advisories say CVE-2026-129289 was introduced in PHP 5.6.0 and that releases older than 8.2 may also be affected by CVE-2026-115560.

Distribution packages can backport fixes without changing the PHP version number, so check the full package version against the distribution's advisory.

Azione consigliata

Upgrade PHP to 8.2.36, 8.3.37, 8.4.28, 8.5.13 or 8.6.0 and restart workers. Until then, disable session upload progress and FastCGI connection reuse to remove some attack paths.

  1. Find every PHP runtime serving web requests, including container images and managed hosting. For each, record the PHP version, thread safety and server API (FPM, mod_php, CGI or LSAPI), session.save_handler, session.upload_progress.enabled, and whether the front end reuses FastCGI connections. For distribution packages, check the full package version against the distribution's advisory.

  2. Upgrade to PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or move 8.6.0 release candidates to 8.6.0. Rebuild container images and restart the PHP-FPM master or Apache so every worker loads the new binary, then verify the version serving web requests. Move PHP 8.1 and earlier to a supported branch.

  3. After upgrading, check whether any php.ini, FPM pool or virtual host still sets session.upload_progress.enabled=1, because an explicit setting overrides the new default. If you need the feature, make every reader and writer of the same session store use the same session.serialize_handler.

  4. Until you can upgrade, apply PHP's interim mitigations in the configuration your web workers use, not only the CLI. Set session.upload_progress.enabled=0 (CVE-2026-126714, CVE-2026-115560) and limit untrusted data stored in sessions (CVE-2026-126714). Turn off FastCGI connection reuse (CVE-2026-129289). On PHP 8.5 and 8.6.0 release candidates, set fatal_error_backtraces=0 and make sure request-specific configuration cannot re-enable it (CVE-2026-129182, CVE-2026-129474). These steps reduce exposure; they do not fix the flaws.

  5. Also until you can upgrade, fix configuration errors and deprecated settings that produce PHP startup warnings, or send PHP errors to syslog instead of a file, then restart PHP (CVE-2026-129496). On PHP-FPM, pm.max_requests=1 blocks the demonstrated CVE-2026-129481 sequence at a performance cost. Keep PHP-FPM listeners off untrusted networks.

Usa questo prompt con un agente in grado di ispezionare la tua infrastruttura.

Assess whether the PHP deployments I am authorized to inspect are affected by the critical vulnerabilities PHP fixed on November 19, 2026: CVE-2026-126714 (phpAfterShell), CVE-2026-129289, CVE-2026-115560, CVE-2026-129496, CVE-2026-129481, CVE-2026-129474 and CVE-2026-129182. Use the PHP security advisories at github.com/php/php-src/security/advisories and the PHP 8 ChangeLog as authoritative sources. For each host, container image or hosting account, collect: the PHP version (including 8.6.0 release candidates), thread safety and server API serving web requests (not only the CLI), the distribution package version if PHP comes from a distribution, the effective values of session.save_handler, session.upload_progress.enabled, session.serialize_handler, error_log, fatal_error_backtraces and zend.exception_ignore_args and pm.max_requests (including FPM pool and virtual host overrides), and whether the web server reuses FastCGI or LSAPI backend connections (for example nginx fastcgi_keep_conn, Apache mod_proxy_fcgi enablereuse or HAProxy). Report each deployment as affected, fixed or unknown for each CVE, with the evidence, and list anything you could not access. Work read-only: do not change configuration, restart services or send exploit traffic.

Find more information and resources at https://radar.cloudflare.com/zero-wire/php-november-2026-security-release-phpaftershell

Cloudflare coverage

Copertura prodotti

The Cloudflare Managed Ruleset includes three Generic Rules, for request smuggling, information disclosure and XML entity attacks, with Log as the default action. The rules are a compensating control, not a fix for the vulnerable PHP runtime.

  • Generic Rules - Request Smuggling
    Azione predefinita: Registra · Piani a pagamento
  • Generic Rules - Information Disclosure
    Azione predefinita: Registra · Piani a pagamento
  • Generic Rules - XML Entity Attacks
    Azione predefinita: Registra · Piani a pagamento

Review your WAF configuration to determine whether you are protected.

Evidence and sources

PHP 8 ChangeLog

Lists the fixes in each release with their GHSA and CVE identifiers.

depthfirst: phpAfterShell

Research by depthfirst, which says it discovered CVE-2026-126714, with its affected versions and mitigation. depthfirst says it withheld the native code execution chain.

Zero Wire: php2shell

Earlier briefing on CVE-2026-109618, CVE-2026-109619 and CVE-2026-115560, last reviewed November 9, 2026.

CISA Known Exploited Vulnerabilities catalog

None of the 17 vulnerabilities was listed in catalog version 2026.11.18, checked on November 19, 2026.