Security alerts · November 22, 2026

PHP: two critical flaws could let attackers run code on web servers

On November 19, 2026, the PHP team disclosed two flaws rated CVSS 9.2. One affects PHP-FPM in the 8.2 to 8.5 branches and older versions, the other only PHP 8.5. Under certain conditions they allow code execution without logging in. No exploitation is confirmed yet, but update soon.

What happened

On November 19, 2026, the PHP developers disclosed two serious security flaws, which were published in the US vulnerability database NVD the same day. PHP powers a large share of the web, from company websites and online shops to internal business applications.

The first flaw, CVE-2026-129289, affects PHP-FPM, the part of PHP that handles requests passed on by a web server such as nginx or Apache. With a certain configuration, an attacker can slip in a forged request and get their own PHP code executed. The second flaw, CVE-2026-129474, is a memory handling bug that only affects PHP 8.5.

Neither the CISA KEV catalog nor the European vulnerability database EUVD lists either flaw as exploited, and no exploitation is known so far. However, the NVD entries link to publicly available proof-of-concept code for the first flaw, so updating should not wait.

Why it is dangerous

The first flaw is a form of “request smuggling”. Picture a courier carrying letters between reception and an office in one bag. If part of an unread letter stays in the bag and the bag is reused, the office may treat it as a new letter with someone else’s signature. Likewise, PHP-FPM may treat leftover data from an unread request as a new request with parameters chosen by the attacker.

According to the PHP team, a single crafted request over the internet is enough, with no login needed. Two conditions must apply, though. The application opens the request input (php://input) without reading it to the end, and the web server reuses its connections to PHP-FPM, which is not the default in nginx or Apache. The result can be execution of the attacker’s PHP code. Red Hat also warns of bypassed security controls and cache poisoning.

The second flaw is a use-after-free: the program reads memory it has already released, which may meanwhile hold other data. The attack is complex. The attacker must control enough request data to influence memory allocation, and it also needs a specific configuration, a suitable spot in the application and a fatal error at the right moment. To run code, the attacker must also know memory addresses. Other attempts may just crash the PHP worker or trigger an ordinary resource limit error.

Both flaws are rated CVSS 9.2 out of 10 under CVSS 4.0, as scored by the PHP team. CVSS measures severity, and Red Hat rates both at 8.1 under CVSS 3.1. EPSS estimates the chance of exploitation within 30 days: as of November 21, 2026, it is 16.1% for the first and 7.2% for the second flaw, higher than 97% and 94% of other flaws. Neither is in the CISA KEV catalog of confirmed exploited flaws.

Who is affected

CVE-2026-129289 affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13. “Before 8.2.36” also covers older branches such as 8.1. Servers most at risk run PHP through PHP-FPM, with an application that leaves php://input partly unread and a web server that reuses connections, for example fastcgi_keep_conn on in nginx or enablereuse=on in Apache mod_proxy_fcgi. With LSAPI, the flaw can disrupt later requests on the same connection.

CVE-2026-129474 affects only PHP 8.5.* before 8.5.13. The PHP team says branches 8.2 to 8.4 are out of scope because no remote attack path is known for them. The attack path is blocked when zend.exception_ignore_args is enabled, as set by the php.ini-production file, or when fatal_error_backtraces is turned off.

Typical environments are web hosting, company websites and online shops. For CVE-2026-129474, the PHP team cites Laravel facades and Magento guest shipping estimation as examples showing that real applications reach the risky calls. It has not demonstrated an attack on a complete Laravel or Magento installation, and using a framework alone does not make a site exploitable. If your site is on shared hosting, ask your provider whether they have updated.

How to check if you are affected

You can find the PHP version in your hosting control panel or on the server with the read-only commands below. The php-fpm name may differ by distribution, for example php-fpm8.3.

php -v
php-fpm -v
dpkg -l | grep php    # Debian, Ubuntu
rpm -qa | grep php    # RHEL, AlmaLinux, Rocky

Distributions such as Red Hat often backport fixes into older package versions. Compare your version with your distribution’s security notice, not only with the PHP team’s version numbers.

To see whether your web server reuses connections to PHP-FPM, search for these settings:

grep -rn fastcgi_keep_conn /etc/nginx/
grep -rn enablereuse /etc/apache2/ /etc/httpd/ 2>/dev/null

On PHP 8.5, also check zend.exception_ignore_args and fatal_error_backtraces. The command below shows the command-line settings, which may differ from PHP-FPM, so also review the FPM pool configuration and any application overrides.

php -i | grep -E 'exception_ignore_args|fatal_error_backtraces'

How to fix it

The fixed versions are PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13. Version 8.5.13 fixes both flaws, and the PHP team recommends upgrading to it as soon as it is available for your system. If you use distribution packages, follow the notices from Red Hat, Ubuntu or SUSE.

  • Find out your PHP version and how it runs (PHP-FPM, LSAPI, Apache module).
  • Install the update from your distribution’s packages or the repository you use. On shared hosting, get confirmation from your provider.
  • Restart PHP-FPM and the web server so the new version is loaded.
  • Check the version again, for example with php-fpm -v, and make sure the site works.

Work in this order: first internet-facing servers that reuse connections to PHP-FPM, then other servers running PHP 8.5, then everything else.

If you cannot update right away, the PHP team recommends setting zend.exception_ignore_args=1 for CVE-2026-129474 in the configuration used by the PHP workers and restarting them. On PHP 8.5, fatal_error_backtraces=0 also helps. Changing only the command-line configuration is not enough, and display_errors=0 does not protect you.

For CVE-2026-129289, Red Hat points to the mitigation steps in its bulletin RHSB-2026-020. Since, according to the CVE description, the flaw only shows up when connections are reused, consider turning reuse off if you do not need it. This is not an official fix from the PHP team, so updating remains essential.

What if you may already be compromised

Neither the PHP team nor Red Hat has published specific indicators of compromise so far. Since exploitation is not confirmed, treat this as a precautionary check. Look mainly at the following:

  • New or modified PHP files in web directories, for example with find /var/www -name '*.php' -mtime -14, which only lists files.
  • Repeated PHP-FPM worker crashes in the logs, shown as messages like “exited on signal 11 (SIGSEGV)”.
  • POST requests that ended with a 500 or 502 error in the web server access logs. The usual log format records neither the size nor the type (multipart, JSON) of the request body.
  • Unknown admin accounts in your CMS or online shop, new cron jobs and unfamiliar SSH keys.

You can find crashes and failed requests with the read-only commands below. zgrep also searches older compressed logs. Log paths vary by distribution.

zgrep -h SIGSEGV /var/log/php*-fpm.log* /var/log/php-fpm/*.log* 2>/dev/null
journalctl -u 'php*-fpm*' --since -14d | grep SIGSEGV
zgrep -h '"POST [^"]*" 50[02] ' /var/log/nginx/access.log* /var/log/apache2/access.log* /var/log/httpd/access_log* 2>/dev/null | tail -n 50

If you find anything, do not delete suspicious files or logs, because they are evidence. Bring in an incident response specialist, especially if the server handles personal data or payments, and change database and application passwords.

Sources

Articles are put together by an AI agent from public sources (vendors, CISA, ENISA, NVD, SK-CERT, NÚKIB), and version numbers and CVEs are checked against them automatically. Always confirm the steps in the vendor advisory before touching production.

← All alerts · RSS

Need help patching or checking your systems?

I can help you find out which systems are affected, update them safely and check whether an attacker already got in. Let us start with an initial consultation, which is deducted from the project price if we work together.