PHP 8.6.0 tested: new session defaults and what breaks
PHP 8.6.0 shipped November 19 with 18 CVE fixes. A Docker test shows three session settings now on by default and is_integer() deprecated.
4 min read
Drafted with AI from the sources linked in this article, then fact-checked and edited by Claire Whitmore before publishing. How we work

By the numbers
- CVE entries fixed in PHP 8.6.0 and 8.5.13
- 18
- CVSS score of seven of the reported flaws
- 9.2
- end of security fixes for PHP 8.2
- Dec 31, 2026
PHP 8.6.0 came out on November 19, 2026, on the same day as security releases 8.5.13, 8.4.28, 8.3.37 and 8.2.36. The new version adds partial function application, a clamp() function and a Duration class. It also changes three session settings that many apps rely on without knowing it. Every PHP site should take one of these updates now, because the PHP 8 ChangeLog lists 18 security fixes for 8.5.13 and 8.6.0.
This comes a month after PHP's last critical release. On October 21, PHP 8.5.12 and 8.4.27 fixed two critical flaws known as PHP2Shell.
What PHP 8.6 adds
The PHP 8.6 release page calls it "a major update of the PHP language." These are the headline features:
- Partial function application. You can fill in some of a function's arguments now and get back a function that takes the rest. A
?marks a missing argument, as inversion_compare(?, '8.6', '>='). clamp(). It keeps a value between a minimum and a maximum.\Time\Duration. A class for spans of time, with nanosecond precision.Io\Poll. An API for waiting on many network connections at once. It is meant for event-loop libraries such as ReactPHP and AMPHP.SortDirection. An enum withAscendingandDescendingcases.- Readonly defaults. Readonly properties can now have default values.
Tech AI Wire test: PHP 8.5.13 against 8.6.0
In a Tech AI Wire test on macOS 26.6.2, the official php:8.5-cli and php:8.6-cli Docker images ran as linux/arm64 containers on Docker Engine 28.4.0. Both images were built on November 19. The same script printed three session settings, trimmed a string and called a deprecated function:
$ docker run --rm -v "$PWD":/t -w /t php:8.5-cli php defaults.php
PHP 8.5.13
session.use_strict_mode '0'
session.cookie_httponly '0'
session.cookie_samesite ''
trim("\fabc\f") length: 5
is_integer(5): bool(true)
$ docker run --rm -v "$PWD":/t -w /t php:8.6-cli php defaults.php
PHP 8.6.0
session.use_strict_mode '1'
session.cookie_httponly '1'
session.cookie_samesite 'Lax'
trim("\fabc\f") length: 3
is_integer(5):
Deprecated: Function is_integer() is deprecated since 8.6, use is_int() instead in /t/defaults.php on line 7
bool(true)
A second script set a session ID that the server never issued, then started the session. PHP 8.5.13 kept the made-up ID. PHP 8.6.0 threw it away and created a new random one. That is strict mode at work, and it blocks an attack called session fixation, where an attacker plants a known ID in a victim's browser.
The new features ran as described. clamp(150, 0, 100) returned 100. array_filter() with version_compare(?, '8.6', '>=') kept only "8.6.0" from a list of four versions. The same file stopped with a parse error on 8.5.13 at the ?. One surprise: new \Time\Duration(...) failed because the constructor is private. You create a duration through methods such as Duration::fromSeconds(90) or Duration::fromMinutes().
What can break when you upgrade to PHP 8.6
The release notes list these behavior changes:
- Session cookies are now HttpOnly, so JavaScript can no longer read them. If your front end reads the session cookie, it will stop working.
SameSite=Laxis now the default. A login that depends on a cross-site POST, such as some single sign-on flows, needs an explicit setting.trim(),ltrim()andrtrim()now remove the form feed character\fby default.fclose(),file_put_contents()andcopy()now returnfalsewhen a final write fails.- Many functions throw a
ValueErrorfor out-of-range values, bad flags or NUL bytes instead of ignoring them.
Deprecations include return inside finally, is_integer(), is_long(), is_double(), doubleval(), spl_object_hash() and the mb_ereg() family. They still work but print warnings.
Which PHP versions got which security fixes
This table counts the CVE entries in each branch's section of the ChangeLog. Not every fix reaches every branch:
| Version | CVE entries fixed | Not fixed in this branch |
|---|---|---|
| 8.6.0 | 18 | none |
| 8.5.13 | 18 | none |
| 8.4.28 | 14 | CVE-2026-129474, -129182, -129438 and -48841 (uriparser) |
| 8.3.37 | 13 | the four above plus CVE-2026-129501 (DOM double free) |
| 8.2.36 | 12 | the five above plus CVE-2026-129481 (session cleanup) |
The Hacker News reports seven of the flaws at CVSS 9.2 and one at 8.8, out of a 0-to-10 severity scale. Two of them, CVE-2026-115560 and CVE-2026-126714, sit in session handling and can lead to remote code execution. The researchers at Depthfirst named the second one "phpAfterShell." According to watchTowr, no attacks using either had been reported as of November 20. PHP says the flaws need non-default settings or uncommon setups.
PHP 8.1 and older get no fixes. The supported-versions page says PHP 8.2 security support ends on December 31, 2026. PHP 8.6 gets active support until December 31, 2028, and security fixes until December 31, 2030.
What this means for developers
Patch first, upgrade second. On 8.2 to 8.5, move to the matching point release today, which keeps you on your current branch. If you cannot patch right away, The Hacker News and watchTowr both say turning off session upload progress reduces exposure. watchTowr adds that it does not fully protect against CVE-2026-126714. Our PHP2Shell explainer explains what session upload progress does and which apps use it.
Plan PHP 8.6 as a normal upgrade, and test logins first. Run your test suite on the php:8.6-cli image with deprecation warnings on. Then check any code that reads the session cookie from JavaScript or posts a login form across sites. If an app on 8.2 cannot move by December 31, budget for that work now.
Sources
- PHP 8.6 Release Announcement - PHP.net
- PHP 8 ChangeLog - PHP.net
- Supported Versions - PHP.net
- PHP Fixes 7 Critical Flaws, Including Bugs That Could Allow Remote Code Execution - The Hacker News
- PHP CVE-2026-115560 FAQ - watchTowr
- PHP Patches Eight Security Flaws, Including a Session Bug That Could Let Hackers Run Code - Computing.net
Related articles

PHP2Shell's two critical PHP flaws, explained
PHP2Shell is two PHP flaws rated 9.2 that can let one request take over a web server. How they work, who is exposed and what fully fixes them.

PHP 8.5.12 and 8.4.27 fix two critical RCE flaws
PHP shipped 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on October 21 to fix two flaws rated 9.2. PHP says updating is the only complete fix.

PHP schedules emergency fix for two critical 9.2 flaws
PHP ships fixes for two critical flaws rated 9.2 at 14:00 UTC on October 21. Only 8.2 to 8.5 get patches, and details leaked a day early.
The weekly digest
One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.