Technology news and discussion on TalkFuse.
PHP 8.6: Things are gonna get a lot more strict around here
PHP 8.6 introduces stricter security defaults for sessions and string handling, aiming to make common attacks harder to carry out. The changes follow a recent wave of serious PHP vulnerabilities and a coordinated effort by the PHP community to improve how quickly flaws are patched.
By default, PHP will reject session IDs it did not create, prevent JavaScript from reading session cookies, and withhold cookies on cross-site POST requests and certain embedded requests. The release also makes some functions report errors more clearly and treats strings containing null bytes more strictly. The article says these measures can help limit session hijacking and cross-site request forgery, but do not prevent remote code execution vulnerabilities.
In short
- PHP 8.6 tightens default session security.
- Cross-site requests will have less access to session cookies.
- Stricter string handling may make some exploits harder.
Steelman: both sides, in good faith
The strongest fair case each way — we don't pick a winner.
The case for
Stricter defaults can protect people who use PHP without requiring every developer to know and configure each session safeguard correctly. Rejecting unissued session IDs and restricting cookie access and cross-site sending could reduce opportunities for session theft and request forgery, while clearer errors and stricter string handling may help developers spot problems sooner. Given recent serious vulnerabilities, advocates may see this as a proportionate way to make common attacks harder, even though it cannot prevent every class of flaw.
The case against
Changing defaults can disrupt existing applications that rely on older session or cookie behaviour, requiring developers to audit and adapt their code during an upgrade. Some may argue that compatibility and predictable migrations matter, and that security settings should be introduced with clear guidance and a path for applications that need different behaviour. They may also caution that stricter defaults address only certain attack paths and should not be mistaken for a substitute for timely patching or broader security work.
Cybersecurity Software Technology