UK — The Register
PHP 8.6: Things are gonna get a lot more strict around here
Software1 min read
PHP 8.6, a popular web programming language, was released with stricter default settings. The change is meant to make it harder for hackers to take over websites and steal user sessions.
What happened
PHP 8.6 came out on its usual yearly schedule. It came right after a wave of security holes that had made every PHP-based app a target. The new version fixes those holes. It also turns off some old, loose default settings that left apps open to attack.
Key facts
- Seven critical remote code execution (RCE) flaws were closed in one sweep. RCE lets an attacker run their own code on a server.
- Patched versions released together: PHP 8.5.13, 8.4.28, 8.3.37, 8.2.36, and the new 8.6.
- Three session settings were made safer: Strict Mode, HttpOnly, and SameSite.
- Apps that use PHP include WordPress, Laravel, and Symfony. All of them had to update.
Why the defaults changed
A session is how a website remembers you after you log in. It uses a session ID, like a ticket. In June, core developer Jörg Sowa pointed out that PHP's session settings were meant to protect users but shipped with weak defaults. His proposal to make them safer was accepted for PHP 8.6.
Why it matters
The new settings make three common attacks harder. PHP will no longer accept session IDs it did not create. It will hide session IDs from page scripts. It will also stop sending login cookies on risky cross-site requests. These changes do not stop all remote code attacks, but they make it much harder for attackers to get in.
What to watch
- Whether websites that use PHP update quickly to the new versions.
- Whether more security flaws appear, since many reports now come from AI tools.
- How the PHP Foundation handles future deadlines for fixing serious bugs.
Glossary
- PHP
- A programming language that runs code on web servers to build websites and apps.
- PHP Foundation
- A group that supports and funds the development of the PHP language.
- HttpOnly
- A cookie setting that stops page scripts from reading the cookie.
- SameSite
- A cookie setting that limits when a browser sends cookies to other websites.