ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
NewsMaterial2 min readDisconfirmAI Editorial

PHP 8.6 Released with Stricter Session Security Defaults

PHP 8.6 tightens session security defaults to mitigate hijacking and CSRF risks, but does not fix the underlying RCE vulnerabilities.

2026-11-24 09:17 GMT+8

The PHP Foundation released version 8.6 on November 19, 2026, introducing new language features such as Partial Function Application (PFA), a Duration class, a polling API, and a clamp() function. However, the most significant change for developers is the hardening of default security settings in response to recent severe vulnerabilities.

Core developer Jörg Sowa proposed changing the default configuration of the PHP session extension to be more secure. This proposal was unanimously approved and applied starting from PHP 8.6. The changes include enabling strict mode (session.use_strict_mode) by default to prevent session fixation attacks, adding the HttpOnly flag to session cookies to block client-side JavaScript access, and setting the SameSite attribute to Lax to mitigate Cross-Site Request Forgery (CSRF) attacks.

Previously, these settings were either disabled or loosely configured by default, requiring developers to manually enable them. With PHP 8.6, the server will not provide session cookies for cross-site requests except for top-level GET navigations, significantly reducing the risk of session theft and impersonation.

Additionally, PHP 8.6 enforces stricter handling of null values in strings. Instead of silently ignoring null bytes, which can be exploited in remote code execution (RCE) attacks to bypass validation routines, the engine now throws errors when encountering null values in certain contexts.

It is important to note that while these default changes make it harder for attackers to exploit sessions, they do not resolve the specific remote code execution vulnerabilities discovered recently. Seven critical vulnerabilities were identified in October 2026, affecting WordPress, Laravel, and Symfony applications. Patches were released for previous versions, and PHP 8.6 includes all these fixes.

However, the new security defaults only apply if the application, framework, or php.ini file has not explicitly set different values. If an existing server's php.ini or Docker image retains old configurations, the new defaults will not take effect. Backend software engineer Rajeev Kevin Durepul noted that reusing old php.ini files during an upgrade provides no benefit because explicit lines like 'session.use_strict_mode = 0' override the new defaults.

Sign in / Sign up
ReadingResearchRadarInvestment framework

The PHP Foundation acknowledged criticism regarding the delay in addressing vulnerabilities whose signs were detected in a 2024 external audit. They stated that the security team faced structural challenges, including resource shortages and difficulties in balancing backward compatibility with security improvements. To address this, an ecosystem security team was established in May 2026, and AI tools like Anthropic's Claude Mythos and OpenAI's Patch the Planet project are being utilized to accelerate vulnerability detection and patching.

Sources

  • byline.network바이라인네트워크↗
  • heise.deiX Magazin↗
Continue researching →