Java4Shell and NGINX2Root: Two Confirmed Remote Code Execution Flaws in the Java and nginx Stack

Two critical flaws disclosed on 17 and 18 November 2026 allow unauthenticated remote code execution (RCE), and researchers have shown working exploits for both. Java4Shell (CVE-2026-114938) sits in the Java runtime itself. CVE-2026-123007, the lead flaw in a set called NGINX2Root, sits in nginx’s HTTP/2 code.

Many web stacks put nginx in front of a Spring Boot or other Java service, so a single request path can cross both bugs. Patches are out for both. Neither had confirmed in-the-wild exploitation at the time of writing, but public proof-of-concept code exists, so that window is closing fast.

Java4Shell (CVE-2026-114938): RCE in the JVM’s Base64 decoder

Java4Shell is a heap overflow in the HotSpot JVM’s hand-optimised Base64 decoder. Oracle and OpenJDK fixed it on 17 November 2026. The researchers who found it rate it CVSS 4.0 9.2 (Critical), and Oracle rates it CVSS 3.1 8.1 (High).

How it works. On x86-64 CPUs with AVX-512 VBMI, the JVM decodes Base64 with a fast assembly routine. Input with an unexpected number of trailing = padding characters makes the length calculation underflow. The decoder then writes past the end of its output buffer and corrupts nearby heap objects.

RCE confirmed. The research firm Calif, which found the bug, demonstrated remote code execution against a sample Spring Boot application. Wiz reports proven pre-authentication RCE against widely used Java products, including Tomcat, Jenkins, Jira, Confluence, Keycloak and Kafka. Wiz also says its research tooling rebuilt a working proof-of-concept within two hours.

Who is affected. You are exposed only if all three of these are true:

  • You run an unpatched OpenJDK-based runtime from 17.0.6 onward (17, 21, 25 or 27). This covers every vendor: Oracle, Corretto, Temurin, Zulu, Liberica, Microsoft, Red Hat and SapMachine.
  • The host CPU is x86-64 with AVX-512 VBMI: Intel Xeon Ice Lake or newer, or AMD Zen 4 or newer. ARM64 (including AWS Graviton) is not affected.
  • Attacker-controlled data reaches Base64 decoding. In web applications that is common: tokens, headers, JSON payloads and file uploads.

Standard Java 8 and 11 are not affected. The one exception is Oracle Java SE 8 Enterprise Performance Pack 8u511b33-perf.

Fixed versions.

Java lineVulnerableFirst fixed (Oracle)
1717.0.6 up to 17.0.2117.0.21.1
21up to 21.0.1321.0.13.1
25up to 25.0.525.0.5.1
27up to 27.0.127.0.1.1
8 Enterprise Performance Pack8u511b33-perf8u513-perf

Fixed builds end in “.1”. A build with the same version number but no “.1” is still vulnerable. Amazon Corretto 17.0.21.1.2 is out. For other distributions, check each vendor’s advisory.

If you can’t patch today. Restart the JVM with -XX:-UseBASE64Intrinsics, which turns off the vulnerable fast path. The slower alternative is -XX:UseAVX=2, on x86 only; Java on ARM will not start with it. On Linux, the flags avx512vbmi, avx512f, avx512bw and bmi2 in /proc/cpuinfo show that a host has the vulnerable hardware.

nginx CVE-2026-123007 (NGINX2Root): RCE through HTTP/2 flow control

CVE-2026-123007 is an integer underflow in nginx’s HTTP/2 flow control. It has been in the code since HTTP/2 support arrived in nginx 1.9.5 in September 2015. F5 fixed it on 18 November 2026 and scores it CVSS 4.0 9.2 (Critical).

How it works. When a client cancels an HTTP/2 stream, nginx returns that stream’s queued bytes to the connection’s send window, without checking the HTTP/2 maximum. Once the window passes that maximum, the bounds check wraps around and accepts every WINDOW_UPDATE frame. The window then goes negative and reaches a memory copy in the TLS send path, which writes out of bounds.

RCE confirmed. Xint, which named the set NGINX2Root, ran commands as the nginx worker inside a container. It then chained the bug with a separate Linux SCTP kernel flaw to get root on the host. Rapid7 published both a crash trigger and a full RCE chain on GitHub, built for Debian 13 amd64 builds of nginx 1.31.6 and 1.31.8. The exploit needs no backend: a one-byte Range request for a static file is enough. It does need sustained traffic of around 128 GB on one connection, which is loud enough to detect.

Who is affected. Every nginx release from 1.9.5 to 1.31.8 that has HTTP/2 enabled. Servers that only speak HTTP/1.1 are not affected. Before disclosure, Xint’s internet scan found 98.9% of nginx hosts whose version it could identify running a release in this range. Forks built on the same code (OpenResty, Tengine, Angie, freenginx) contain it too.

Fixed versions.

ProductFirst fixed
nginx Open Source (stable)1.30.7
nginx Open Source (mainline)1.31.9
NGINX Plus37.3.0.1 and 37.0.8.1 (R33 to R36 get no fix)
NGINX Ingress Controller5.8.0
NGINX Gateway Fabric2.9.0

The community kubernetes/ingress-nginx project is archived and will not be patched. It ships HTTP/2 on by default. Linux distributions usually backport fixes, so nginx -v may still show an old version number after you patch. Check your distribution’s advisory rather than the version string.

If you can’t patch today. Set http2 off; and remove http2 from your listen lines. A reload is enough, and browsers fall back to HTTP/1.1. This breaks native gRPC, which needs HTTP/2. On community ingress-nginx, set use-http2: "false" in the controller ConfigMap.

The same release fixes nine more nginx CVEs. One of them, CVE-2026-118899, hangs a worker on any TLS 1.3 listener and has no workaround. That alone is reason to upgrade even if you turn HTTP/2 off.

Why the pair matters for nginx + Java stacks

A common production layout is nginx terminating TLS and HTTP/2 at the edge, proxying to Spring Boot or another Java service behind it. This week both layers had an unauthenticated RCE:

  • The edge. CVE-2026-123007 is reached before any routing, authentication or application code runs. A static file is enough to trigger it.
  • The application. Java4Shell is reached wherever untrusted Base64 is decoded. That includes JWTs, Basic auth headers, encoded payloads and file uploads, often before the authentication check finishes.
  • The host. Both exploits give code execution as the worker process. A container is not a hard boundary: Xint’s nginx demo escalated to host root through a kernel bug.

Two details change your exposure. First, if a CDN or cloud load balancer terminates HTTP/2 in front of nginx, the nginx risk drops, but that is a mitigation, not a fix. Second, a Java service on ARM (for example AWS Graviton) is not exposed to Java4Shell. The same image running on an x86 Ice Lake or Sapphire Rapids host is.

What to do now

  1. Inventory. List every nginx instance (including ingress controllers and container images) and every JVM at 17.0.6 or later. Note which nginx instances have HTTP/2 on and which JVMs run on x86 hosts with AVX-512 VBMI.
  2. Patch nginx. Upgrade to 1.30.7 or 1.31.9, or your distribution’s backported package. Restart with a binary upgrade (USR2), not just a reload, so the old workers go away. Until then, set http2 off; where you can.
  3. Patch Java. Move to the “.1” builds (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1) or your vendor’s equivalent. Rebuild shared base images first so every service picks up the fix. Until then, add -XX:-UseBASE64Intrinsics to JAVA_TOOL_OPTIONS and restart.
  4. Order by exposure. Internet-facing nginx with HTTP/2 comes first, then public Java APIs, then internal services.
  5. Watch for exploitation. For nginx, look for one TLS connection pulling tens of GB inbound with little outbound, and for worker crashes on signal 11 or 6 in the error log. For Java, look for unexpected JVM crashes (hs_err_pid files). On both, watch for a worker process starting a shell or another unexpected program.
  6. Reduce container blast radius. Run as non-root and drop capabilities. Where SCTP isn’t needed, block the module (install sctp /bin/false in /etc/modprobe.d/).

References

Leave a Reply