
PHP 8.6 is out, and every supported PHP version gets security fixes: an analysis
PHP 8.6.0 arrived on 19 November with partial function application, clamp(), a Duration class and a new polling API. The same day, PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36 fixed security bugs the PHP team rated up to critical. Here’s what matters, and what to do first.
Illustration: UtiBox
Two releases in one day
On Thursday, 19 November 2026, the PHP project published two different kinds of release:
- PHP 8.6.0, the new yearly feature release. In PHP’s words, it “marks a major update to the PHP language.”
- Security releases for every supported branch: 8.5.13, 8.4.28, 8.3.37 and 8.2.36. Each announcement says simply: “This is a security release.”
We wrote about the schedule when 8.6 was still due, in PHP 8.6 is due on 19 November, and PHP 8.2 reaches end of life on 31 December. This is the follow-up, now that the code is out.
Part 1: the security fixes
How serious is it?
PHP warned in advance. Its notice of 18 November said the releases would “address security vulnerabilities affecting all supported PHP versions. The highest severity is CRITICAL.” It added an important limit: “The issues rated CRITICAL require either non-default configuration or uncommon setups.”
So this is urgent, but it isn’t a reason to panic. A default PHP install isn’t necessarily exposed to the worst bugs. You can’t easily prove which setup you have, though, so patching is the safe answer.
This is also the second security round in four weeks. On 21 October, PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fixed two critical remote-code-execution bugs, which we covered in Patch PHP now: the “php2shell” flaws are under active attack. If you skipped that round, today’s releases include those fixes too.
What was fixed
PHP 8.5.13’s ChangeLog lists 18 CVEs. PHP 8.6.0 ships with the same fixes. Grouped by area:
| Area | What was fixed (from PHP’s ChangeLog) | Why it matters |
|---|---|---|
| Sessions (3) | Partially overwritten session files and a session serializer mismatch, each of which “can lead to remote code execution”; a use-after-free after an interrupted session shutdown | Almost every PHP site with logins uses sessions |
| PHP-FPM (3) | Request smuggling “through an unread HTTP request body”; an epoll use-after-free that “can lead to local privilege escalation”; XSS on the FPM status page | FPM is how most Nginx and modern Apache setups run PHP |
| Core (2) | Use-after-free bugs in error backtraces, one of which “can lead to remote code execution” | Affects 8.5 and 8.6 |
| Date (1) | A timezone cache use-after-free that “can lead to remote code execution” | |
| CGI (1) | Out-of-bounds read and write while correcting PATH_INFO | Only for PHP run as CGI |
| SOAP (2) | Information disclosure through malformed array dimensions; a use-after-free with DTD entity references | Sites that accept SOAP requests |
| Phar (1) | Signature bypass “via algorithm downgrade” | Code that trusts signed .phar archives |
| DOM (1) | A double free during XML serialization | |
| Standard (2) | Mixed-case HTTPS:// and FTPS:// URLs “can expose data in plaintext”; denial of service through folded HTTP response headers | Any PHP code that fetches URLs |
| URI (2) | Bundled uriparser updated to 1.0.3; incorrect URI serialization for oversized input | The URI extension is new in 8.5 |
Two are worth spelling out:
- The HTTPS one is subtle. Per the ChangeLog, a URL written with unusual capitals, such as
HTTPS://, could end up sent without encryption. If your code builds URLs from user input or config files, this is a real-world risk, not just a theoretical one. - The FPM status page XSS only matters if you’ve switched on
pm.status_pathand can reach it from a browser. If you have, it’s a good moment to put it behind a login or an IP allowlist.
Which version fixes it for you
| You run | Install | Notes |
|---|---|---|
| PHP 8.5 | 8.5.13 | All 18 fixes |
| PHP 8.4 | 8.4.28 | 14 fixes. The two Core bugs and the two URI fixes don’t apply to 8.4’s code |
| PHP 8.3 | 8.3.37 | Security-only branch. Check its ChangeLog entry for the list |
| PHP 8.2 | 8.2.36 | Security-only, and end of life on 31 December 2026. Plan your move off 8.2 now |
| PHP 8.6 | 8.6.0 | Already includes them |
On shared hosting and Linux packages: your host or distribution may ship the fix under its own version number (a backport). Check its security notice rather than relying on php -v alone. On cPanel and Plesk, look for updated “ea-php” or Plesk PHP packages.
How to check and patch
- Find every PHP version you run. The command line and the web server can use different ones: compare
php -vwith aphpinfo()page, then delete that page. - Update from a trusted source, then restart PHP-FPM (
systemctl restart php8.4-fpmor similar). A new package doesn’t help until the running processes are replaced. - Check the site still works. Our HTTP status checker and website health report show whether pages still answer normally.
UtiBox can’t see which PHP version your server runs or whether it’s patched. Many sites hide the X-Powered-By header (they should), and backports make version numbers unreliable anyway. Only a check on the server tells you for sure.
Part 2: what’s new in PHP 8.6
PHP 8.6 is a big release for a “.x”. Here are the changes most developers will notice, using the PHP project’s own examples.
Partial function application
The headline feature. You can now call a function with some arguments filled in and a ? for the rest. You get back a closure that waits for the missing values:
$versions = ['8.4', '8.5', '8.6', '8.7', '9.0'];
$supportsPfa = array_filter(
$versions,
version_compare(?, '8.6', '>='),
);
Before 8.6 that was fn($v) => version_compare($v, '8.6', '>='). It looks like a small saving. In code that passes callbacks around all day (collections, pipelines, event handlers), it adds up. PHP also says array_map() with these callbacks is now compiled into a plain loop, so the shorter version can be faster too.
clamp()
A tiny function that every project has written itself at least once:
clamp(110, 0, 100); // 100
clamp(-10, 0, 100); // 0
It works with any comparable value, not just numbers. Expect to see a lot of custom max(min(...)) helpers deleted.
Time\Duration
A class for lengths of time (timeouts, retry delays, benchmark timings) with nanosecond precision, kept separate from dates and time zones. That separation matters. Mixing “how long” with “what time” is a classic source of bugs around clock changes. Durations can be added, multiplied and compared, so min() and clamp() work on them directly.
Io\Poll
A modern way to watch many network connections at once. It uses the best mechanism each operating system offers (epoll, kqueue, event ports or WSAPoll), and it removes the limits of stream_select(). Most developers won’t use it directly, but async libraries like ReactPHP and AMPHP are its intended users, and PHP calls it a “common foundation” for them.
Smaller things you’ll still notice
- Readonly properties can have defaults.
public readonly string $parser = SlugParser::class;now works. - A
SortDirectionenum (Ascending,Descending) gives libraries a shared, type-safe way to say “sort order”. - Stream errors can throw. Set a stream context’s error mode to throw a
StreamExceptionwith structuredStreamErrorobjects, instead of warnings you have to catch with@anderror_get_last(). mysqli::quote_string()escapes and quotes in one step, likePDO::quote(). Prepared statements are still the better tool.- JSON errors now say where in the input the problem is.
- Sodium gains post-quantum key exchange (X-Wing and ML-KEM-768), and TLS streams get session resumption and TLS 1.3 0-RTT.
Part 3: what could break when you upgrade to 8.6
Most of the changes are deprecations: warnings now, removal in a later major version. A few are real behaviour changes. The ones most likely to affect existing sites:
- Safer session defaults.
session.use_strict_modeandsession.cookie_httponlyare now on, andsession.cookie_samesitedefaults toLax. That’s good for security. It can break cross-site flows that relied on the session cookie, such as some payment-provider returns or embedded iframes. Test checkout and single-sign-on flows first. - Custom session handlers that don’t implement both
create_sid()andvalidateId()are deprecated. trim()now strips form feeds (\f) by default.fclose(),file_put_contents()andcopy()returnfalsewhen flushing or closing fails, instead of silently succeeding. Code that never checked their return values may now see errors it was quietly missing. That’s arguably a fix.- More
ValueErrors for out-of-range values, invalid flags and strings containing NUL bytes, where PHP used to truncate or ignore them. - Deprecated:
returninsidefinally; returning a value from__construct();mb_ereg()and the other mbstring regex functions (use PCRE with theuflag); theis_double(),is_long(),is_integer()anddoubleval()aliases;spl_object_hash();strcoll(); andletandisas names of classes or functions.
A sensible upgrade plan
- Patch your current branch today. That’s the security part, and it doesn’t change behaviour.
- Run your test suite on 8.6 with deprecation notices visible (
error_reporting=E_ALL), and fix what it shows. - Wait for your stack. Check that your framework, CMS, plugins and hosting panel support 8.6. Major releases usually need a few weeks for that.
- If you’re on 8.2, don’t wait for 8.6. 8.2’s security support ends on 31 December. Move to 8.4 or 8.5 now, then to 8.6 when your stack is ready.
Sources
- PHP: PHP 8.6 release page (opens in a new tab) and migration guide (opens in a new tab)
- PHP: News archive 2026 (opens in a new tab) (18 November security notice; 19 November release announcements)
- PHP: ChangeLog for PHP 8 (opens in a new tab) (8.5.13, 8.4.28, 8.6.0)
- PHP: Supported versions (opens in a new tab)
Related
More from Server & Security News
Drupal cuts minor-version security support to 8 months: dates to plan for
From 2027 each Drupal core minor release gets 8 months of security coverage instead of 12, because AI tools have flooded the security team with reports. Drupal 10 and Drupal 11.3 both lose support…
AI agents found and used a MONAI Label zero-day to take over a university server
Amazon says a China-linked attacker used the open-source Cairn framework to find a path traversal flaw in MONAI Label and gain root on a university server. A fix and advisory exist, but the sources…
F5 releases emergency hotfixes for critical BIG-IP remote code execution flaws
F5 has warned customers to install out-of-band hotfixes for critical BIG-IP flaws that unauthenticated attackers could use to crash traffic handling or run code. F5 says there is no mitigation…














