PHP2Shell: what it is and how to protect your servers
PHP2Shell lets attackers take over PHP web servers without logging in, and it is already being exploited. Fixed versions, mitigations and how to check.…
Oliver Pinson-Roxburgh
CEO and Co-Founder
19th Nov 2026
If your business runs NGINX with HTTP/2 enabled, upgrade to version 1.31.9 or 1.30.7 (or the fixed NGINX Plus builds) as soon as you reasonably can. On 18 November 2026, F5 released fixes for five serious NGINX vulnerabilities, each rated 9.2 out of 10 on CVSS 4.0. The most notable, CVE-2026-123007 (nicknamed "nginx2root"), has existed in the code since version 1.9.5 in September 2015.
An attacker who can reach a server's HTTP/2 port can, under the right conditions, run their own code on that server without logging in. F5 says this is possible where ASLR (a memory-protection feature) is off or can be worked around. Independent security researchers have shown working code execution in their tests, including against servers on AWS, GCP and Azure.
Code that runs this way has the same rights as an NGINX worker process, not full control of the machine. To go further, an attacker needs a second weakness. One research team demonstrated that with a separate bug in the Linux kernel's SCTP code they could get root access, even from inside a Docker container.
There is no need to panic, but this is worth acting on promptly. As of 19 November, neither F5 nor CERT-EU had reported any real-world attacks, and the flaw was not on CISA's Known Exploited Vulnerabilities list. Some practical limits also apply. One published version of the attack needed roughly 128 GB of traffic and relied on specific CPU features; on connections slower than about 300 Mbit/s it would likely time out.
The counterweight is that public proof-of-concept code already exists, and attack techniques tend to improve once details are out. Waiting for the first reported attack before patching leaves very little room.
According to the nginx.org security advisories, every open-source NGINX release from 1.9.5 to 1.30.6, and from 1.31.0 to 1.31.8, is affected, including the October 2026 security releases. NGINX Plus is also affected. Some cloud and container images, and Linux distribution packages, may lag behind the upstream fix, so it is worth checking each source of NGINX you rely on.
Products built on NGINX are affected too. F5 has released fixes for NGINX Ingress Controller (5.8.0 and 2026-lts-r11), NGINX Gateway Fabric (2.9.0), NGINX Instance Manager (2.25.0), F5 WAF for NGINX (5.16.2 and 5.14.4) and F5 DoS for NGINX (4.13.0). NGINX App Protect WAF and DoS, and older Ingress Controller and Gateway Fabric branches, have no fix yet. If you run NGINX in Kubernetes, check F5's advisory for your Ingress Controller or Gateway Fabric version.
The same release fixes four further issues, each reachable only in a particular setup: HTTP/2 combined with proxying under heavy connection load, certain resolver and subrequest configurations, HTTP/3, and NGINX used as a mail proxy. Upgrading to 1.31.9 or 1.30.7 addresses all five, along with several lower-severity issues that the workarounds below do not cover.
The steps below walk through four stages: find out whether your servers are exposed, upgrade or apply a temporary workaround, confirm the fix has taken effect, and keep an eye out for warning signs. Most teams can complete the checks in under an hour. If you would like a second pair of eyes on any of it, get in touch with our team.
You are exposed to the main flaw if a server runs an affected NGINX version and accepts HTTP/2. Work through these checks for every NGINX instance, including containers, load balancers and reverse proxies.
nginx -v. Open-source versions 1.9.5 to 1.30.6 and 1.31.0 to 1.31.8 are affected. If NGINX came from your Linux distribution, also check the full package version (for example with dpkg -l nginx or rpm -q nginx), because distributions sometimes backport fixes without changing the number nginx -v shows.sudo nginx -T 2>&1 | grep -n "http2"
HTTP/2 is on if a listen line contains http2 (for example listen 443 ssl http2;) or a server block contains http2 on;. This shows the configuration on disk, which may differ from what is running if NGINX has not been restarted since it last changed, so also do the outside check below.
openssl s_client -connect your-server.example:443 -servername your-server.example -alpn h2 </dev/null 2>/dev/null | grep ALPN
If the output shows ALPN protocol: h2, the server accepts HTTP/2. Run it once for each website hostname the server hosts, as HTTP/2 can be on for one site and off for another. If you connect by IP address, put the IP after -connect and the website hostname after -servername. This check only covers HTTPS. NGINX can also accept HTTP/2 without encryption (a listen line with http2 but no ssl), which is exposed too; curl --http2-prior-knowledge -sI http://your-server.example:8080/ returning HTTP/2 confirms it on that port.
If you are a Defense.com customer, Vulnerability Scanning can help you find internet-facing NGINX servers you may have forgotten about, and Application Scanning checks the websites they serve. Treat scan results as a starting point and not a final answer. Many servers hide their NGINX version, and distribution packages are often patched without the version number changing, so confirm with the checks above.
| Flaw | Only reachable when |
|---|---|
| CVE-2026-123007 (nginx2root) | HTTP/2 is on |
| CVE-2026-123633 | HTTP/2 is on, requests are proxied to a backend, and the worker is close to its worker_connections limit |
| CVE-2026-123634 | A proxied server name is built from variables, together with an SSI or mirror subrequest that looks up that name |
| CVE-2026-121810 | HTTP/3 is on |
| CVE-2026-113425 | NGINX is used as a mail proxy |
Upgrading is the real fix; the workarounds only buy time. Open-source 1.31.9 and 1.30.7 fix all five flaws.
| You run | Upgrade to |
|---|---|
| NGINX Open Source 1.31.0 to 1.31.8 (mainline) | 1.31.9 |
| NGINX Open Source 1.9.5 to 1.30.6, including older branches such as 1.28 | 1.30.7 |
| NGINX Plus 37.1.0 to 37.2.0.1 | 37.3.0.1 |
| NGINX Plus 37.0.0 to 37.0.7.1 | 37.0.8.1 |
| NGINX Plus R34 to R36 | No fix listed by F5 yet; apply the workarounds below and plan a move to a supported 37.x build |
| NGINX Plus R33 and earlier | Out of support and not assessed by F5; upgrade to a supported 37.x build |
systemctl restart nginx) or NGINX's live binary upgrade. A plain reload keeps the old program running, and existing connections can stay on old worker processes.F5 has not published an official mitigation. These are our suggestions for reducing exposure until you can upgrade.
http2 off; in each affected server block and remove http2 from its listen lines. On 1.9.5 to 1.25.0, remove http2 from the listen line, so listen 443 ssl http2; becomes listen 443 ssl;. Review every server block that shares the same listener, including IPv6 ([::]) listen lines, and not just the one for your main site. Clients fall back to HTTP/1.1, so sites keep working, though some may load slightly slower.install sctp /bin/false to a .conf file in /etc/modprobe.d/. This stops the module loading in future but won't unload one already loaded or disable SCTP built into the kernel, so a reboot may be needed.After any configuration change, run nginx -t to check the config, then restart NGINX.
Once you have upgraded or applied a workaround, confirm it actually took effect, then keep an eye out for signs of earlier tampering.
nginx -v again and check it shows 1.31.9, 1.30.7 or a fixed NGINX Plus build (or, for distribution packages, the fixed package version from your distribution's advisory).ps -o pid,lstart,cmd -C nginx should show all processes started after your upgrade.openssl s_client -connect your-server.example:443 -servername your-server.example -alpn h2 </dev/null 2>/dev/null | grep ALPN
The output should no longer show ALPN protocol: h2.
CIRCL, the Luxembourg computer incident response center, suggests looking for the following. None of them proves an attack on its own, but any of them is worth investigating.
worker process … exited on signal, which points to exploitation attempts though not to successful code execution.A clean access log is not proof that nothing happened. HTTP/2 control traffic used in this attack normally doesn't appear in access logs as requests, so check process, network and system logs too. If you find anything suspicious, isolate the host and follow your incident response process.
Sources: F5 advisory K000163926, the nginx.org security advisories, CERT-EU Security Advisory 2026-022, CIRCL TR-105, and the Ubuntu and Debian security trackers.
As of 19 November 2026, no attacks had been reported and the flaw was not on CISA's Known Exploited Vulnerabilities list. Public proof-of-concept code exists, so that could change.
Not necessarily. What matters is whether your NGINX origin accepts HTTP/2 from anyone who can reach it. Test the origin directly.
Browsers fall back to HTTP/1.1 automatically, so sites keep working. Performance may dip slightly on pages with many resources.
No. A reload leaves the old program in memory. Do a full restart or a live binary upgrade.
This advisory is NGINX-specific. Apache HTTP Server had its own, unrelated HTTP/2 flaw this month: CVE-2026-119618, rated critical by Apache, affects versions 2.4.55 to 2.4.70 when mod_http2 is loaded. It was fixed in 2.4.71 on 11 November, so upgrade if you run an affected version.
Oliver Pinson-Roxburgh
CEO and Co-Founder
Share this article
Vulnerability Scanning maps your internet-facing servers and checks them for known weaknesses, so you know what needs patching first.
PHP2Shell lets attackers take over PHP web servers without logging in, and it is already being exploited. Fixed versions, mitigations and how to check.…
Discover the importance of patch management for your organization and the dangers of leaving security vulnerabilities unpatched.…
Everything you need to know about the Apache Log4shell & Log4j vulnerability; how it occurred in the Log4j 2 Java library, and how to protect your UK business.…
A Defense.com customer found and patched a PHP2Shell-vulnerable internal server the same day, using Orbital agent compliance checks. Here's how it works.…