# PHP 8.6 Released with Stricter Security Defaults and Critical Patches

The latest PHP update addresses major RCE vulnerabilities and hardens session configuration settings.

- **Source:** [www.theregister.com - Articles](https://brifing.si/source/2c34ea50-d341-4a10-925d-12c012a9ad10)
- **Published:** 2026-11-20
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://www.theregister.com/devops/2026/11/20/php-86-things-are-gonna-get-a-lot-more-strict-around-here/5311486>
- **On Brifing:** https://brifing.si/s/70ce415b-ce6c-4a56-9f43-e1c20b20d384

## PHP 8.6 Security Release

PHP 8.6 arrived on its annual schedule, addressing seven critical remote code execution flaws that plagued the ecosystem since October. This coordinated release includes patched versions 8.5.13, 8.4.28, 8.3.37, and 8.2.36. These updates aim to secure applications like WordPress and Laravel against unauthenticated attackers who previously exploited these vulnerabilities to crash workers.

## Hardening Session Defaults

Developer Jörg Sowa successfully proposed hardening three session extension settings: Strict Mode, HttpOnly, and SameSite. These changes address historically liberal defaults that left applications exposed. By rejecting uninitialized session IDs and enforcing stricter cookie handling, the new version aims to prevent attackers from masquerading as legitimate users through session hijacking techniques.

## Preventing Session Hijacking

The update mandates the HttpOnly flag by default, preventing client-side JavaScript from accessing session IDs. Additionally, session cookies are now withheld during cross-site POST requests, subrequests, and iframes. These measures ensure cookies are only sent on same-site requests or top-level GET navigations, effectively mitigating risks associated with forged forms and malicious links.

## Null Byte Vulnerability Fixes

PHP 8.6 introduces stricter handling for strings containing null values, which were previously exploited to trigger remote code execution. The engine now throws errors instead of silently processing null bytes. This change prevents C-based functions from misinterpreting string boundaries, a common trick where attackers manipulate data processing to execute unauthorized commands.

## Improved Error Reporting

The update enhances system reliability by forcing functions to return explicit false values when operations fail or terminate prematurely. This applies to critical tasks like closing files or copying data. By ending the practice of silent failures, developers can now detect data integrity bugs earlier and respond to system errors more effectively.

## New Functional Capabilities

Beyond security, PHP 8.6 introduces Partial Function Application, allowing developers to pre-fill function arguments to generate reusable closures. Other additions include a native polling API for event-driven networking, a Duration class capable of tracking time over 250 years, and a clamp() function designed to ensure numerical values remain within defined acceptable ranges.

## Deployment Configuration Risks

Backend engineer Rajekevin Dourepoulle warns that these security improvements may not take effect if existing configurations override them. If administrators reuse old php.ini files via Docker or Ansible templates, explicit settings like session.use_strict_mode = 0 will negate the new defaults. Users must manually verify their configurations to ensure the security updates are active.

## Strategic Security Outlook

The PHP Foundation admitted that consensus-driven gridlock previously delayed critical fixes, vowing to accelerate future patch releases. While these changes do not stop the influx of AI-generated vulnerabilities, they represent a shift toward proactive security. Future development must balance these hardening efforts with the practical realities of legacy deployment and configuration management.

## Sources covering this story

- https://www.theregister.com/devops/2026/11/20/php-86-things-are-gonna-get-a-lot-more-strict-around-here/5311486 — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
