Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 9 min read

Patch PHP for WordPress: November 2026 Security Release

The PHP security release of 19 November 2026 fixes 18 vulnerabilities in PHP 8.5 and 12 to 14 in the older branches. Seven are rated critical (CVSS 4.0 score 9.2): all seven affect PHP 8.5, five affect 8.3 and 8.4, and f

The PHP security release of 19 November 2026 fixes 18 vulnerabilities in PHP 8.5 and 12 to 14 in the older branches. Seven are rated critical (CVSS 4.0 score 9.2): all seven affect PHP 8.5, five affect 8.3 and 8.4, and four affect 8.2. The fixed versions are PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36. Every WordPress site runs on PHP, so this one lands on your server whether or not you use the features involved.

The good news first: the PHP security team says the critical issues "require either non-default configuration or uncommon setups", and no exploitation in the wild had been reported when this was written. This guide explains which fixes matter for WordPress, how to check your own server in a few minutes, and how to update and confirm the fix. Every output below is real: from this site's own production server (PHP 8.4.27 on PHP-FPM behind nginx) and from a disposable WordPress 7.1.3 test server on Apache with PHP 8.2.35.

Which PHP version do you need?

Update to the fixed release for the branch you are on:

Your branch
Vulnerable up to
Fixed in
Notes

PHP 8.5
8.5.12
8.5.13
Gets four fixes the other branches do not need

PHP 8.4
8.4.27
8.4.28

PHP 8.3
8.3.36
8.3.37

PHP 8.2
8.2.35
8.2.36
End of life on 31 December 2026: plan the move to 8.4

PHP 8.1 and older
Every version
No fix
Unsupported; upgrade the branch

The full list is in the official PHP 8 changelog, and each fix links to its advisory on GitHub.

The fixes that matter for WordPress

PHP-FPM request smuggling (CVE-2026-129289, critical)

This is the one to understand first, because most WordPress hosting runs PHP-FPM. When the web server keeps a FastCGI connection to PHP-FPM open and reuses it for the next request, bytes left unread in one request body could be read as a new request that the web server never sent. According to the advisory, that forged request can change PHP settings and run attacker-supplied PHP code, with a single unauthenticated request and no memory tricks.

It needs two things: a front end that reuses backend connections (nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, some HAProxy setups, and LiteSpeed's LSAPI), and an application path that opens php://input without reading it to the end. Standard nginx and Apache configurations close the connection after each request and are not affected by the demonstrated attack. Checking which one you have takes one command (see step 2 below).

Two session bugs that can lead to code execution (CVE-2026-115560 and CVE-2026-126714, critical)

Both end in PHP unserialising data an attacker influenced. The first involves session upload progress, the same feature behind last month's PHP2Shell vulnerability: when two parts of a server read and write the same session files with different session.serialize_handler settings, part of an upload key can be decoded as an object. The second affects PHP's default files session handler, which could leave a half-overwritten session file that decodes differently from either session written into it.

WordPress core does not use PHP sessions, but plenty of plugins and other applications on the same server do. The proof of concept in the advisory used gadget classes from Guzzle and Monolog, two libraries that many WordPress plugins bundle in their vendor folders. The fix turns session upload progress off by default in the new releases. If you followed the PHP2Shell advice and switched it off already, you removed the first path months early.

Timezone cache use-after-free (CVE-2026-129496, critical)

If PHP writes a warning to a PHP error log file while it starts up (an invalid date.timezone is the confirmed example), a fresh worker can use freed memory when the first request arrives. A crafted request has crashed FPM workers this way, and code execution was shown in lab conditions. The trigger is specific: a startup warning, PHP's own file-based error_log, and an early warning in a new worker. A server that starts cleanly does not meet it.

PHP-FPM local privilege escalation (CVE-2026-129291, high)

With catch_workers_output switched on, someone who can already run PHP code in an FPM worker (a vulnerable plugin, for example) could execute commands as the FPM master process, which usually runs as root. The official php:*-fpm Docker images switch this option on in docker.conf, and on this site's own container the master process does run as root:

$ grep -Rn catch_workers_output /usr/local/etc/php-fpm.d/docker.conf
15:catch_workers_output = yes
$ grep Uid /proc/1/status
Uid:    0   0   0   0

That turns "a plugin bug in one site" into "root in the container", so Docker-based WordPress hosts should not leave this one for later.

The rest

The remaining fixes cover a PHAR signature bypass, two SOAP bugs, a double free in the new DOM XML serialiser, an XSS in the PHP-FPM status page, mixed-case HTTPS:// URLs that could fall back to plain text, a denial of service through folded HTTP response headers, and a memory bug in php-cgi during PATH_INFO handling. PHP 8.3 and later also get a fix for a use-after-free after an interrupted session shutdown, which completes a PHP2Shell patch from last month that turned out to be incomplete. PHP 8.5 alone gets two more critical use-after-free fixes in fatal error backtraces, plus two fixes in its new URI extension.

Check your server in five minutes

Step 1: Which PHP version and settings do you run?

Save this as check-php-nov-2026.php outside your web root and run it with php check-php-nov-2026.php:

<?php
// Compare this PHP with the 19 November 2026 security releases and print the settings the advisories mention.
$fixed  = array( '8.2' => '8.2.36', '8.3' => '8.3.37', '8.4' => '8.4.28', '8.5' => '8.5.13' );
$branch = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;

printf( "PHP %s (%s)\n", PHP_VERSION, PHP_SAPI );
if ( ! isset( $fixed[ $branch ] ) ) {
    echo "Branch $branch got no fix in this release: move to a supported branch.\n";
} else {
    $patched = version_compare( PHP_VERSION, $fixed[ $branch ], '>=' );
    printf( "Fixed in %s: %s\n", $fixed[ $branch ], $patched ? 'patched' : 'UPDATE NEEDED' );
}

foreach ( array( 'session.upload_progress.enabled', 'session.serialize_handler', 'session.save_handler', 'log_errors', 'error_log', 'date.timezone' ) as $key ) {
    printf( "%-32s %s\n", $key, var_export( ini_get( $key ), true ) );
}

On this site's production container, before updating:

PHP 8.4.27 (cli)
Fixed in 8.4.28: UPDATE NEEDED
session.upload_progress.enabled  ''
session.serialize_handler        'php'
session.save_handler             'files'
log_errors                       '1'
error_log                        ''
date.timezone                    'UTC'

And on the Apache test server, which still has PHP's old default of upload progress switched on:

PHP 8.2.35 (cli)
Fixed in 8.2.36: UPDATE NEEDED
session.upload_progress.enabled  '1'
session.serialize_handler        'php'
session.save_handler             'files'
log_errors                       ''
error_log                        '/dev/stderr'
date.timezone                    'UTC'

The command line can read a different php.ini from PHP-FPM on some systems (Debian and Ubuntu keep separate cli and fpm folders under /etc/php/). To see what the website itself runs, check Tools β†’ Site Health β†’ Info β†’ Server in wp-admin, which shows the PHP version the web server is using.

Step 2: Does your web server reuse FastCGI connections?

On nginx, print the full configuration and search it. The first command proves PHP is reached over FastCGI; the second must print nothing:

$ nginx -T 2>/dev/null | grep -c fastcgi_pass
1
$ nginx -T 2>/dev/null | grep -n fastcgi_keep_conn
$

No output means fastcgi_keep_conn is not set, so the smuggling attack has no reused connection to ride on. If it prints a line with on, remove it (or set it to off), reload nginx, and update PHP before turning it back on.

On Apache, search the configuration for connection reuse to PHP-FPM:

$ grep -Rn enablereuse /etc/apache2/
$ apache2ctl -M 2>/dev/null | grep -E "php_module|proxy_fcgi"
 php_module (shared)

The test server runs PHP inside Apache (php_module) rather than through PHP-FPM, so the smuggling bug does not apply to it at all, but the session and timezone fixes still do. On RHEL-based systems the configuration lives under /etc/httpd/ instead.

Step 3: Is session upload progress switched off?

Look at session.upload_progress.enabled in the step 1 output. An empty value or '0' means off. If it says '1' and nothing on the server shows upload progress bars (WordPress does not), switch it off in the PHP configuration, not with ini_set(), which is too late:

; php.ini, or an FPM pool file as php_admin_flag[session.upload_progress.enabled] = off
session.upload_progress.enabled = 0

If you do need the feature, every application and pool that shares the same session folder must use the same session.serialize_handler. The update does not enforce that across separate configurations.

Step 4: Does PHP start without warnings?

Run php -v. Anything printed before the version line (a "PHP Warning" or "PHP Deprecated" about a setting) is a startup diagnostic, the trigger for the timezone bug. Fix the setting it names, then restart PHP-FPM and read the start of its log for the same kind of line.

Step 5: Is catch_workers_output on?

grep -Rn "^catch_workers_output" /etc/php/*/fpm/ /usr/local/etc/php-fpm.d/ 2>/dev/null

If it prints yes, the privilege escalation fix applies to you. The update is the real fix. Switching the option off loses worker output in the PHP-FPM log, so treat that only as a stopgap.

How to update

  • Debian or Ubuntu with the OndΕ™ej SurΓ½ packages (the usual source of current PHP versions): sudo apt update && sudo apt install --only-upgrade 'php8.4*', then sudo systemctl restart php8.4-fpm. Change 8.4 to your branch.
  • Distribution packages (Debian's or Ubuntu's own PHP): security fixes are backported without changing the upstream version number, so the checker above can say "UPDATE NEEDED" even after you have patched. Read apt changelog php8.4-fpm for the CVE numbers instead.
  • Docker: move the image to the fixed tag, for example FROM php:8.4.28-fpm, then rebuild with docker compose build --pull and recreate the container. A rebuild without --pull can reuse the old cached image. The official images usually reach Docker Hub a day or two after a PHP release, and on 19 November the fixed tags were not there yet. Until they are, use the stopgaps at the end of this guide.
  • Managed WordPress hosting: you usually cannot update PHP yourself. Check the version in Site Health, and if it is still on the old release a few days after 19 November, ask support when they will deploy it.

Restart PHP-FPM (or Apache, if PHP runs inside it as mod_php) after any update, so the master process and every worker run the new binary. Workers that are still running the old version stay vulnerable until they are replaced.

Confirm the fix

Run the checker again. On a patched server the second line says patched. Then load a few pages, log in to wp-admin and check Site Health shows the new version, which confirms the web server picked up the restarted PHP rather than only the command line.

If you cannot update today

The advisories list stopgaps that reduce the risk until the update is in place:

  • Keep FastCGI connection reuse off (fastcgi_keep_conn unset in nginx, no enablereuse=on in Apache).
  • Set session.upload_progress.enabled = 0 in the PHP configuration.
  • Fix any startup warning, or send PHP errors to syslog instead of a file, then restart PHP.
  • Never expose a PHP-FPM port directly to the internet.

None of these replaces the update. This release follows last month's PHP2Shell fixes, and on PHP 8.3 and later it completes one of them. PHP releases security updates every four weeks, so it pays to have an update routine that takes minutes rather than an afternoon. PHP 8.2 gets its last fixes this year: if your site still runs it, this is a good moment to move to 8.4.

Originally published on WP Tuts Hub.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.