Patched runtime, unpatched code? Reading the 2026 PHP and Node.js fixes as a developer
Last updated:

Security releases are usually treated as an operations task: bump the version, restart, move on. The 2026 fixes for PHP and Node.js deserve a closer read from developers, because many of them describe habits in application code that stay risky even after the runtime is patched.
TL;DR
- The 2026 PHP and Node.js fixes failed in the same four places: TLS, HTTP parsing, file handling and outbound calls.
- Each points at a coding habit that stays risky after the runtime is patched, such as disabled certificate checks or redirects followed with credentials.
- Runtime defaults are tuned for compatibility; set explicit body, depth and header limits for internet-facing endpoints.
- Log the runtime version from inside the application, because panels and Dockerfiles describe intent, not reality.
- Turn each layer into a CI test that fails when the habit comes back.
PHP shipped its largest batch on 24 September 2026 in 8.2.34, 8.3.35, 8.4.26 and 8.5.11. Node.js followed a June release with a July one in 22.23.2, 24.18.1 and 26.5.1, and another high-severity release is pre-announced for 21 October 2026. Read side by side, the two runtimes failed in the same four places.
1. TLS: trust the name, not the session
In PHP, CVE-2026-91769 let hostname verification fall back to the certificate CN after a SAN mismatch. In Node.js, CVE-2026-58040 completed an earlier fix where a reused TLS session in the HTTPS Agent could skip hostname verification. Both affect your code when it talks to other services, so never turn off verify_peer or rejectUnauthorized to make a test pass, and avoid sharing one HTTP agent between services that expect different certificates or client identities.
2. HTTP parsing: limits belong in your code too
PHP’s CVE-2026-91765 crashed a public SoapServer through deeply nested XML, and Node.js CVE-2026-56846 let HTTP/2 header blocks escape the session memory limit. A related low-severity Node.js bug, CVE-2026-58044, hid headers beyond maxHeadersCount from userland while still using them for framing, which opens the door to request smuggling in proxies that rebuild headers. If you expose a parser to the internet, set explicit limits for body size, nesting depth and header count, and do not assume the runtime’s defaults are your protection.
3. Files: archives and sandboxes are not boundaries
PHP’s CVE-2026-6103 let a crafted TAR header inject extra entries into a Phar archive, and Node.js CVE-2026-58043 let a Permission Model grant reach paths outside the --permission allowlist. The lesson is the same in both languages: treat every uploaded archive as hostile, extract it into an isolated directory with size and entry limits, and use the Node.js Permission Model as one layer, not as your only file sandbox.
4. Outbound calls: secrets travel further than you think
PHP’s CVE-2026-91766 carried credentials across a redirect to a different host in the HTTP stream wrapper. Node.js CVE-2026-48615 from June leaked proxy credentials into ERR_PROXY_TUNNEL error messages. Disable automatic redirects on authenticated requests or re-check the target host before following one, keep tokens out of URLs, and scrub error objects before they reach logs or error trackers.
Check your own service against the four layers:
Which limits do you inherit by default?
Most of the parser bugs above were made worse by defaults that nobody changed. Both runtimes ship limits, but they are tuned for compatibility, not for an endpoint on the open internet. These are the ones worth knowing by name.
| Limit | PHP default | Node.js default | What to do |
|---|---|---|---|
| Request body size | post_max_size 8M |
No limit in core http; frameworks set their own |
Set an explicit limit per endpoint, smaller for JSON APIs |
| Header size | Set by the web server in front | --max-http-header-size 16 KiB |
Keep the default unless a proxy needs more |
| Header count | Set by the web server in front | maxHeadersCount 2,000 |
Lower it on internal services |
| Nesting depth of input | max_input_nesting_level 64 |
Not limited for JSON bodies | Validate depth before parsing untrusted structures |
| HTTP/2 session memory | Not applicable | maxSessionMemory 10 MB |
Lower it for clients that only send small requests |
The table is not a list of settings to copy. It is a list of decisions that are being made for you when you leave them alone.
A field note: the version you think you run
A runtime fix only helps the code that actually runs on it. When we moved a set of WordPress sites to PHP-FPM on one of our shared servers, the control panel listed them all as PHP 8.2. In practice 26 of the first 41 sites were running another version selected per account through CloudLinux PHP Selector, which the panel’s own listing did not show, and moving them to the listed version broke several plugins that had never run on it.
For a developer the lesson is to log the runtime from inside the application: PHP_VERSION and php_sapi_name() in PHP, process.version in Node.js. A version declared in a Dockerfile, a panel or a ticket is a claim about the runtime, not a measurement of it.
How do you test these four layers in CI?
Each layer above can be turned into a test that fails when a habit comes back. None of them needs a vulnerability to reproduce; they check that your code refuses what it should refuse.
- TLS. Point the HTTP client at a test endpoint whose certificate names a different host and assert that the request fails. A test suite that passes this with verification switched off is the bug.
- Parsing. Send a body one byte over the limit you configured and assert a 413, and send a JSON document nested deeper than your maximum and assert a 400 rather than a timeout.
- Files. Feed your archive handler a TAR with an entry named
../escape.txtand one with more entries than your limit, and assert that both are rejected without writing anything outside the target directory. - Outbound calls. Stand up a test server that answers an authenticated request with a redirect to another host, and assert that the client does not follow it, or that the credentials do not appear on the second request.
These tests are cheap and stay valid across runtime upgrades. They also document, in code, which security decisions the application makes for itself instead of leaving them to defaults.
What should change in code review?
Tests catch regressions; review catches the decisions before they become code. Four questions are worth adding to the review checklist of any service that handles network input or talks to other services. Does this change turn off or weaken certificate verification anywhere, including in a helper or a test fixture that might be reused? Does it parse input from outside without an explicit size, depth or count limit? Does it open, extract or include a file whose name or contents come from a user? And does it make an authenticated request that could follow a redirect, or log an error object that might contain a URL with credentials?
None of these questions needs security expertise to ask. They map directly onto the four places where the 2026 bugs sat, and a “yes” to any of them is a reason to look twice rather than a reason to reject the change.
What to change in your code and pipeline
- Pin the runtime where it is defined. Declare
engines.nodein package.json and thephprequirement in composer.json, and make CI fail when the runtime it builds on is older than the patched release. - Rebuild container images. Pull fresh
phpandnodebase images and rebuild; an old image tag keeps the old runtime no matter what the server runs. - Leave end-of-life lines. PHP 8.1 and Node.js 20 receive none of these fixes; target PHP 8.4 or 8.5 and Node.js 24 LTS.
- Audit redirects and credentials. Search for authenticated
file_get_contents, stream contexts and fetch or axios calls that follow redirects automatically. - Set parser limits explicitly. XML depth, JSON and body size, header count and HTTP/2 session memory, configured in code and in the proxy.
- Isolate archive handling. No Phar or TAR extraction from user input without size, entry and path checks.
- Clean your logs. Redact proxy URLs, tokens and Authorization headers from error output.
- Automate the next one. Let Dependabot or Renovate open pull requests for runtime and base image updates, so the October Node.js release is a merge rather than a project.
The emergency PHP release of 21 October is covered in PHP2Shell for developers, and the trust-store side of the same month in one compromised CA, many trust stores.
The short version
The four layers are a useful map beyond 2026. Every year’s runtime fixes will land somewhere in TLS, parsing, files or outbound calls, because those are the places where untrusted input meets code. If your application already makes explicit choices at each of them, verified by tests and asked about in review, the next security release is a version bump instead of an investigation.
FAQ: the 2026 PHP and Node.js fixes for developers
If PHP and Node.js are patched in 2026, can application code still be vulnerable?
Yes. The runtime fixes close the specific bugs, but several of them were reachable only because code turned off TLS checks, followed redirects with credentials or parsed untrusted archives without limits. Those habits stay risky after the patch.
PHP verify_peer vs Node.js rejectUnauthorized: what do they protect against?
Both enforce certificate validation for outgoing TLS connections. Turning either off lets any certificate through, which defeats the hostname fixes released in 2026. Leave them on in every environment, including tests, and fix the certificate instead.
Is it risky to share one Node.js HTTPS agent between different backend services?
It can be. Session reuse across services that expect different certificates or client identities was the subject of CVE-2026-58040. Use one agent per trust policy, so a session established for one service is never reused for another.
How does CVE-2026-58044 enable request smuggling in a Node.js proxy in 2026?
Headers beyond maxHeadersCount were hidden from application code but still used for message framing. A proxy that rebuilt headers from what it could see could forward a request whose framing differed from what the backend read. Update, and avoid rebuilding headers by hand.
Does PHP’s file_get_contents send credentials when it follows a redirect to another host?
Before the September 2026 fix it could, through the HTTP stream wrapper (CVE-2026-91766). Disable automatic redirects for authenticated requests, or check the target host yourself before following one.
How should an application handle uploaded TAR or Phar archives safely?
Treat every archive as hostile. Extract it into an isolated directory with limits on total size, entry count and path, reject entries that escape the target directory, and never let PHP open user-supplied archives through the phar:// wrapper.
Is the Node.js Permission Model a reliable sandbox for untrusted code?
No. Several 2026 releases fixed ways around it, including CVE-2026-58043. Use it as one guard rail inside a process you already trust, and isolate untrusted code with containers, separate users or separate machines.
Where should a project declare its PHP and Node.js versions so CI catches old runtimes?
In the manifests the tools already read: the php requirement in composer.json and engines.node in package.json, plus a CI step that fails when the build image is older than the patched release.
Node.js 20 vs Node.js 24: what does end of life mean for a development team in 2026?
Node.js 20 stopped receiving security fixes on 30 April 2026, so every fix after that is missing from it. Move development, CI and production to 24 LTS together, so tests run on the runtime that ships.
Why should an application log its own runtime version at start-up?
Because panels, Dockerfiles and tickets describe the intended runtime, not the actual one. Logging PHP_VERSION or process.version at start-up gives a measured value for every deployment.
Sources
- PHP 8 ChangeLog, php.net
- June 2026 security releases, nodejs.org
- July 2026 security releases, nodejs.org
- October 2026 security releases (pre-announcement), nodejs.org