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.
Explained simply
PHP is a programming language used to build websites and web services. Websites often use sessions to remember that a visitor has signed in; a session ID links the visitor’s browser to that session, and a cookie can carry the ID.
If someone steals or misuses a session ID, they may be able to act as that visitor. Cross-site request forgery is another kind of attack, in which a visitor’s browser is tricked into sending an unwanted request to a site where they are signed in. PHP’s maintainers and wider developer community set the language’s defaults and issue fixes when problems are found.
Stricter defaults can make some common attacks harder, though they may also affect websites that rely on older behaviour. They address some risks around sessions and handling text, but do not stop every kind of vulnerability, such as flaws that let an attacker run code remotely.
Cybersecurity Software Technology