Originally published at hafiz.dev
On 19 November PHP shipped 8.5.13, 8.4.28, 8.3.37 and 8.2.36, alongside the first stable 8.6.0. The 8.3.37 changelog lists 13 security fixes. Five of them are rated critical, every one at 9.2 on CVSS v4. My production server, a single Ubuntu box with several sites behind nginx and PHP-FPM, was still on 8.3.36 the next morning.
I patched it. But first I read every critical advisory and asked one question of each. What would an attacker need from a Laravel app for this to work?
The answer surprised me a little. Most of them need something a stock Laravel app never does. And the ones that could still matter depend on what else shares the server, not on Laravel. One setting even changed during the upgrade, although nobody touched php.ini.
What shipped for PHP 8.3
The release announcement is short. It says this is a security release and encourages all 8.3 users to upgrade. The detail lives in the changelog and the php-src security advisories. Three of the five critical fixes are in ext-session, PHP's own session extension. One is in ext-date and one is in PHP-FPM.
Laravel has its own session layer. It never calls session_start(), and its drivers (file, database, redis, cookie) are its own classes. I checked the 13.x branch of laravel/framework to be sure. There isn't a single session_start( call under src/.
So for each fix, the question becomes concrete. Does the bug need PHP's native session machinery, a specific php.ini, or a specific web server setup?
| Fix | Where | What an attacker needs | Default Laravel app on nginx |
|---|---|---|---|
| Session serializer mismatch (CVE-2026-115560) | ext-session | Upload progress on, plus something that later reads that native session with the php serializer and has a gadget chain | The write half works. Nothing reads it back |
| Partially overwritten session files (CVE-2026-126714) | ext-session | Native file sessions, attacker influence over session data, an interrupted write | No |
| Use-after-free after interrupted session shutdown (CVE-2026-129481) | ext-session | A native session whose cleanup hits a fatal error, then any next request on the same worker | Not from Laravel itself. A shared pool changes that |
| Timezone cache use-after-free (CVE-2026-129496) | ext-date | A startup warning written to a file-based error_log, then an early diagnostic in a fresh worker | Depends on php.ini, not on Laravel |
| PHP-FPM request smuggling (CVE-2026-129289) | PHP-FPM | Persistent FastCGI connections from the front end, plus a code path that opens php://input and doesn't read it to the end | No, with nginx's defaults |
The other eight fixes in the 8.3 branch cover SOAP, Phar signatures, the FPM status page, PHP-CGI and the HTTP stream wrappers. Four of them are rated high. Worth patching, but none of them is the reason to patch today.
The session bugs live in code Laravel never runs
The serializer mismatch is the one with the scariest headline, so I started there. PHP's session upload progress feature tracks a running upload by writing progress data into the visitor's session. The PHP manual says plainly when that happens. "The upload progress information is written to the session before any scripts are executed."
Read that twice. It doesn't matter that Laravel never starts a native session. If session.upload_progress.enabled is on, a multipart POST with the right field name and a PHPSESSID cookie makes PHP write attacker-chosen file and field names into a session file under session.save_path. Your app code hasn't even loaded yet.
That's only half the attack, though. The advisory needs a second step, something that reads the same stored session with a different serializer and then deserializes it with a gadget chain available. In a Laravel app nothing reads /var/lib/php/sessions. Laravel's file driver writes to storage/framework/sessions through its own handler.
So what reads native sessions on a typical Laravel server? Usually nothing. On my box the native session directory was empty:
$ ls /var/lib/php/sessions | wc -l 0 But a server that also hosts a WordPress site, an old admin panel or a phpMyAdmin install is a different story. Those use native sessions. The partially overwritten session files bug needs the same thing, native file sessions with attacker influence over the data.
The interrupted shutdown use-after-free is the subtle one. It's an incomplete fix for one of October's advisories (CVE-2026-109619), and it says outright that disabling upload progress does nothing for it. It needs a native session whose cleanup hits a fatal error. Then the next request on the same FPM worker touches freed memory, and that request doesn't need to belong to the same user or the same site. My server runs every site in one FPM pool called www. So if any of those sites used native sessions, a Laravel site sharing the worker would inherit the problem. The advisory says it could lead to code execution, although that hasn't been demonstrated yet. But "shared worker" is exactly the kind of detail I'd rather not argue about.
Request smuggling needs a front end Laravel doesn't control
PHP reads php://input lazily. If a code path opens the stream and stops early (the advisory's example is a malformed multipart body that makes PHP's parser stop at a predictable position), the rest of the body stays unread on the connection.
On a normal nginx setup that's harmless. nginx closes the FastCGI connection after each request, and the leftover bytes go with it. With persistent connections they don't. The leftover bytes get parsed as the next FastCGI request, and an attacker can forge its parameters, including PHP_ADMIN_VALUE settings like auto_prepend_file.
So the check is one grep. Is anything keeping FastCGI connections open?
$ grep -rn "fastcgi_keep_conn" /etc/nginx/ $ No output on my server. fastcgi_keep_conn defaults to off, so every site there closes the connection after each request. The advisory also names Apache's mod_proxy_fcgi with enablereuse=on, HAProxy FastCGI backends and LSAPI. If you run any of those, this is the fix to apply first.
The Laravel side helps a little too. Symfony's Request::getContent() reads php://input to the end with file_get_contents(), unless you explicitly ask for a stream resource. But the advisory warns that reading the whole body may not be a reliable mitigation on its own. So the front end setting is the one I'd check.
How I patched the server
The server uses Ondřej Surý's PPA, so the fix arrived as 16 php8.3 packages. I wanted three things. A way back, no surprise config changes, and proof afterwards that every PHP process was on the new binary.
- Back up the PHP config, then list the packages and dry-run the upgrade:
tar -czf /root/php-config-backup-$(date -u +%Y%m%d-%H%M%S).tar.gz /etc/php/8.3 PKGS=$(apt list --upgradable 2>/dev/null | grep -oE '^php8\.3[^/]*' | tr '\n' ' ') apt-get -s install --only-upgrade $PKGS The dry run showed 16 upgrades, nothing new installed and nothing removed.
- Upgrade, keeping every existing config file:
DEBIAN_FRONTEND=noninteractive UCF_FORCE_CONFFOLD=1 \ apt-get install -y --only-upgrade \ -o Dpkg::Options::="--force-confdef" \ -o Dpkg::Options::="--force-confold" $PKGS The tail of the output had something I didn't ask for:
Setting up php8.3-fpm (8.3.37-2+ubuntu24.04.1+deb.sury.org+1) ... Setting up php8.3 (8.3.37-2+ubuntu24.04.1+deb.sury.org+1) ... systemctl restart supervisor.service Service restarts being deferred: /etc/needrestart/restart.d/dbus.service Ubuntu's needrestart saw that supervisor's children were running the old PHP binary and restarted supervisor on its own. That restarts every queue worker on the box. It's the right outcome (a worker on the old binary is still unpatched), but it happens mid-upgrade, whether or not a job is running. Laravel workers finish the current job when they get SIGTERM, as long as supervisor's stopwaitsecs is longer than your slowest job. I wrote about that in what happens to a running job when the worker stops. Check that setting before you patch, not after.
- Verify. Both binaries report 8.3.37, and no FPM process is left on the old one:
$ php-fpm8.3 -v | head -1 PHP 8.3.37 (fpm-fcgi) (built: Nov 19 2026 20:02:49) $ for p in $(pgrep -f php-fpm); do readlink /proc/$p/exe; done | sort | uniq -c 5 /usr/sbin/php-fpm8.3 A process still on a replaced binary shows up there with (deleted) after the path. Then I extracted the backup and ran diff -rq against /etc/php/8.3. Identical. Every site returned 200 before and after.
The setting that changed under an untouched php.ini
One more detail from the verification. In October, after the previous session advisory, I'd added a one-line override for FPM:
; /etc/php/8.3/fpm/conf.d/99-upload-progress.ini session.upload_progress.enabled = Off The CLI has no such file. Its php.ini has the line commented out (;session.upload_progress.enabled = On), so the CLI uses PHP's compiled default. Before the upgrade, php -i on the CLI reported On. The upgrade kept php.ini byte for byte, as the diff confirmed.
$ php -i | grep '^session.upload_progress.enabled' session.upload_progress.enabled => Off => Off The compiled default flipped. The serializer mismatch advisory says the fix disables session upload progress by default, and the binary agrees. The configuration page of the PHP manual still says it defaults to 1 at the time of writing, so don't trust the manual for this one. Trust php -i. I'm keeping the explicit Off for FPM anyway. A default can flip back on a rebuild, a different PPA or a different branch, and an explicit line in conf.d survives all of them.
Nothing on my server uses upload progress, and in a Laravel app you probably don't either. Upload progress bars in the browser come from XHR's upload progress events, which need nothing from PHP. (I covered the Laravel side of big uploads in handling large file uploads without crashing your server.)
FAQ
Does Laravel use PHP's native sessions?
No. Laravel's session layer is its own Store class with its own drivers, and the framework never calls session_start(). That's why most of the ext-session fixes in this release don't reach Laravel code directly. The exception is upload progress, which PHP handles before any script runs.
Should I turn off session.upload_progress?
Yes, unless something on the server uses it, and Laravel apps rarely do. The fixed releases already default it to off, but an explicit session.upload_progress.enabled = Off in your FPM conf.d keeps it off whatever the default does later.
Do I need to restart queue workers after a PHP upgrade?
Yes. A long-running queue:work process keeps the old PHP binary in memory until it restarts. On Ubuntu, needrestart may restart supervisor for you during the upgrade, as it did for me. Elsewhere, restart them yourself, and make sure stopwaitsecs lets running jobs finish.
I'm on Laravel Forge or Laravel Cloud. Do I need to do anything?
Securing Laravel's notice before the release said Laravel would contact Forge, Cloud and Vapor users with the steps. On Forge you still own the server, so check the PHP version yourself with php -v and php-fpm8.3 -v (or your version's binary) instead of assuming.
Patch it anyway
None of this is a reason to wait. "My Laravel app doesn't reach it" is true for a clean server, and very few servers stay clean. A second site in the same FPM pool, a forgotten phpMyAdmin, someone enabling fastcgi_keep_conn for a benchmark next year. Each of those quietly turns a "no" in that table into a "yes".
What the analysis does tell you is where to look while you patch. Three checks cover most of it:
grep -rn "fastcgi_keep_conn\|enablereuse" /etc/nginx/ /etc/apache2/ 2>/dev/null php-fpm8.3 -i | grep -E '^(session\.upload_progress\.enabled|session\.save_path|error_log|date\.timezone) ' ls /var/lib/php/sessions | wc -l The first finds persistent FastCGI connections. The second shows the upload progress setting, where native sessions live, and whether startup warnings go to a file (the timezone bug needs that). The third tells you whether anything on the box uses native sessions at all.
My own answers were no keep-alive, upload progress off, and an empty session directory. error_log is unset, so startup warnings go to FPM's own log, which the timezone advisory says doesn't meet its condition. So the box wasn't exposed to the demonstrated attacks, and it's patched now regardless. The rest of that server's setup is in how I hardened my VPS with SSH keys, Cloudflare and Tailscale. For the dependency side of fast security fixes, see Composer 2.11's cooldown, which holds back security releases too.
What I'm changing next is the one-pool-for-everything setup. With a separate FPM pool per site, a native session in one app can't leave freed memory for a request from another, and the interrupted shutdown bug would never have been a question.
