FrankenPHP 1.14.1, released on 3 December 2026, is a security release. The modern PHP app server built on Caddy fixes three vulnerabilities in FrankenPHP itself, two rated high, and upgrades its built-in Mercure hub to 1.1.7, which fixes 13 more. It also fixes a container thread-limit bug that could get your server killed under load.
The maintainers say upgrading is “strongly recommended”. The good news from the release notes is that none of the FrankenPHP vulnerabilities can be exploited with the default configuration. This guide explains each one in plain terms, how to check whether your setup is exposed, and how to upgrade the binary, Docker image or static build.
Quick summary
| Issue | Severity | Exposed only if you… |
|---|---|---|
Use-after-free in getenv() (GHSA-2v8j-j26h-cpx5) |
High | enabled the OPcache JIT |
| NUL byte in a document root built from request data (GHSA-h69m-723r-5w86) | High | build root from placeholders like {query.tenant} |
Caddy path rule bypass with worker match (GHSA-hg2f-3j3f-v3r3) |
Medium | use a worker match rule and route on PATH_INFO |
| 13 Mercure hub vulnerabilities (5 high) | Mixed | use the mercure directive |
The release notes say all of these were found by Anthropic’s OSS Scanner.
The three FrankenPHP vulnerabilities
1. getenv() use-after-free with the JIT
With the OPcache JIT enabled, the result of getenv() for a value set with env or putenv() could be freed while it was still in use. The notes say a client could then control what later getenv() calls return. That’s a serious problem if your app reads secrets or feature flags this way.
The JIT is off by default. Check whether you turned it on:
frankenphp php-cli -i | grep -E "opcache.jit(_buffer_size)? "
If opcache.jit_buffer_size is above zero and opcache.jit isn’t disable/off, you’re in the affected group. Upgrade first. If you can’t upgrade straight away, a temporary option is to turn the JIT off (opcache.jit=disable).
2. NUL byte in a dynamic document root
Some multi-tenant setups build the root of a php or php_server directive from request data, for example:
example.com {
php_server {
root /srv/tenants/{query.tenant}/public
}
}
A %00 in that value let PHP run or print a file that the split extension is supposed to exclude. Sites with a fixed root aren’t affected. If you build roots this way, upgrade and think about switching to a fixed mapping, such as a map directive with a known list of tenants, so raw request data never ends up in a filesystem path.
3. Path rule bypass with worker match
In worker mode, a request like /x.php/admin could reach the worker with PATH_INFO=/admin. That got around a Caddy path rule on /admin*. The fix changes how the server variables are filled in when match sends a request to a worker:
PATH_INFOandDOCUMENT_URIare now always emptySCRIPT_NAMEandPHP_SELFnow name the worker script
Possible behaviour change: if your worker app or router reads PATH_INFO to decide the route, check it after upgrading. Most modern frameworks route on REQUEST_URI, but older code and custom front controllers sometimes use PATH_INFO. A quick test endpoint helps:
<?php
// public/debug-server.php: remove after testing
header('Content-Type: application/json');
echo json_encode(array_intersect_key($_SERVER, array_flip([
'REQUEST_URI', 'PATH_INFO', 'SCRIPT_NAME', 'PHP_SELF', 'DOCUMENT_URI',
])), JSON_PRETTY_PRINT);
Mercure 1.1.7: 13 fixes and a faster hub
If your Caddyfile has a mercure directive, you’re running the built-in Mercure hub. It had 13 vulnerabilities, 5 rated high, and all of them are fixed by the bundled Mercure 1.1.7. The notes also say the hub now delivers “up to 2.5x more updates per second on 2.5x less CPU”, thanks to faster URL Pattern matching and batched writes. If you don’t use the mercure directive, this part doesn’t affect you.
Non-security fixes worth knowing
max_threads autoin containers: before this release, the thread limit came from the host’s memory. A container with a few hundred MB on a large host could start hundreds of threads and get killed under load. It now uses Go’s memory limit when that’s lower. Caddy sets that limit from the container’s cgroup, or you can set it withGOMEMLIMIT.apache_request_headers()andgetallheaders()now includeHostfor HTTP/1.1 requests, the same as$_SERVER['HTTP_HOST'], Apache and PHP-FPM.- Locale fast path: each PHP thread now sets up its locale state, so functions like
basename()take the faster ASCII path with UTF-8 locales.
The release also updates the docs with a useful reminder: worker mode never reseeds mt_rand(), rand() or shuffle() between requests. For anything security-sensitive, use random_int() or Random\Randomizer:
<?php
$token = bin2hex(random_bytes(16));
$code = random_int(100000, 999999);
$r = new Random\Randomizer();
$pick = $r->pickArrayKeys(['a' => 1, 'b' => 2, 'c' => 3], 1)[0];
How to upgrade
Docker: pull the new image tag and rebuild. Pin a version rather than relying on latest:
FROM dunglas/frankenphp:1.14.1-php8.6
Standalone binary: download the 1.14.1 binary for your platform from the releases page, replace the old one, and restart the service. Then check:
frankenphp version
Custom builds with xcaddy: rebuild with the same flags and environment you used before (see the compile guide), but pin the new module version:
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/[email protected] \
--with github.com/dunglas/mercure/caddy
If you compile the Mercure module in yourself, check that it resolves to Mercure 1.1.7 or later so you get the hub fixes too.
Laravel Octane: if you use Octane’s FrankenPHP server, update the binary Octane uses and restart workers with php artisan octane:reload.
After upgrading
- Check the version on every node.
- If you use worker mode, test routes that depended on
PATH_INFO. - In containers, watch the thread count and memory under load. With the fix it should stay within the cgroup limit.
- If you use Mercure, run your real-time features end to end.
Takeaway
FrankenPHP 1.14.1 is a quick, low-risk upgrade with real security value, especially if you use the JIT, dynamic document roots, worker match rules or the built-in Mercure hub. Even on a default setup, the container thread-limit fix alone makes it worth installing. Pin 1.14.1, redeploy, and check any code that reads PATH_INFO.
