Creuto is now an OpenAI Select Partner Read More

Software Architecture & Technical

Java4Shell Spring Boot check: Basic auth yes, Nimbus JWT no

Java4Shell Spring Boot risk turns on the login path. Basic auth and java-jwt reach the flawed decoder pre-auth; Nimbus and JJWT do not. Patch in that order.

Java4Shell Spring Boot check: Basic auth yes, Nimbus JWT no

A Spring Boot API that accepts HTTP Basic login passes the Authorization header to java.util.Base64.getDecoder() before it knows who is calling. That decoder is the one Java4Shell (CVE-2026-114938) corrupts. So the Java4Shell Spring Boot answer is a JDK update, not a Spring Boot upgrade. Which login paths decode untrusted Base64 tells you which services to patch first, and which can wait for the next rebuild.

This post covers three things: which common Spring Boot authentication components call the vulnerable decoder, how to find your own call sites, and how to confirm which JDK your container image runs. It does not repeat the full vendor patch matrix or CPU triage. Those sit in their own guides.

The key facts, as of 18 November 2026:

Is Spring Boot vulnerable to Java4Shell? The framework is not the bug

Spring Boot is a demonstrated target, but only as an example app. Calif writes that it "demonstrated RCE in sample applications built on widely used frameworks, including Apache Struts and Spring Boot". Spring Boot is not on Calif's list of tested products, which runs from Keycloak and Jira to Kafka and Elasticsearch. The flaw lives in the JVM. Any Spring Boot app becomes a target when the JDK is vulnerable and its code decodes attacker-controlled Base64.

That is why no Spring release fixes this. As of 18 November, the Spring security advisories page lists nothing for CVE-2026-114938. You don't need to upgrade Spring Boot for Java4Shell. If you're on an older line, though, the support window is a separate question worth asking while you're rebuilding images anyway. Our post on Spring Boot 3.5 end of life covers that decision.

Calif names the ordinary features that expose the decoder: "authentication and file uploads". OX Security narrows the vulnerable gate to untrusted input reaching the java.util.Base64 basic or URL decoder, and excludes the MIME decoder and third-party Base64 libraries. That distinction matters for Spring Boot because the common auth components don't all use the same decoder.

Java4Shell Spring Boot exposure map: which decoder each login path calls

We read the current source of the components a Spring Boot API most often puts in front of its controllers. Three of them call the vulnerable java.util.Base64 decoders on input that arrives before login. Four do not.

ComponentBase64 callOn the Java4Shell path?
Spring Security HTTP Basic (BasicAuthenticationConverter)Base64.getDecoder()Yes, before authentication
Apache Tomcat BasicAuthenticatorBase64.getDecoder()Yes, before authentication
auth0 java-jwt (JWTDecoder)Base64.getUrlDecoder()Yes, before the signature is checked
Spring Security OAuth2 resource server (Nimbus)Nimbus Base64CodecNot through java.util.Base64
JJWTJJWT's own io.jsonwebtoken.io.Base64Not through java.util.Base64
Spring Security SAML 2.0 (Saml2Utils)Base64.getMimeDecoder()MIME decoder, excluded by OX
Jackson byte[] fields in JSON bodiesJackson's own Base64VariantNot through java.util.Base64

Sources for each row are in the sections below. We checked the main branch of each project on 18 November. Older versions may decode differently, so confirm against the version in your lockfile.

Java4Shell Tomcat basic authentication and Spring Security

Spring Security's BasicAuthenticationConverter decodes the header with Base64.getDecoder().decode(base64Token). Tomcat's BasicAuthenticator imports java.util.Base64 and calls Base64.getDecoder().decode(encoded). In both, decoding is the first thing that happens to the credentials, so an anonymous request reaches it.

This matches what Kevin Breen of Immersive posted on X, as reported by Tenable. He said he had a working exploit, that it "will need to be application specific", and that Tomcat's Basic authentication and the java-jwt library offer ways to exploit the flaw before login.

Java4Shell java-jwt pre-auth: decoding comes before verification

The auth0 java-jwt library's JWTDecoder runs Base64.getUrlDecoder() on the header and payload in its constructor, and verification happens elsewhere. A forged token never needs a valid signature to reach the decoder. If your filter chain parses bearer tokens with com.auth0:java-jwt, treat that service like a Basic auth one.

The default Spring Security resource server is different. Spring Security uses the Nimbus library for parsing JWTs, and Nimbus's Base64.decode() delegates to its own Base64Codec, not the JDK's. JJWT's Base64Decoder calls JJWT's own Base64 class too. Neither is on the path OX describes. That lowers the priority of those services. It doesn't clear them, because a patched JDK is still the fix.

SAML and the MIME decoder: lower priority, not cleared

Spring Security's SAML 2.0 support decodes the response with Base64.getMimeDecoder(). OX excludes the MIME decoder but does not say why, and Calif's write-up doesn't list decoder variants at all. Calif's proof of concept uses getDecoder() only. We'd rank a SAML-only service below a Basic auth one, but we wouldn't skip it on one vendor's exclusion.

Find the Base64 call sites in your own Spring Boot code

Framework components are only half the map. Your own controllers may decode Base64 file uploads, webhook signatures, API keys or cursor tokens. Start with a search of your source and your dependency tree:

grep -rnE 'Base64\.get(Url)?Decoder\(\)' src/
mvn dependency:tree | grep -E 'com\.auth0:java-jwt'
./gradlew dependencies | grep -E 'com\.auth0:java-jwt'

For each hit, ask one question: can a caller with no session reach this line? A public upload endpoint that decodes a Base64 field with getDecoder() belongs in the same tier as Basic auth. A decode inside an admin-only batch job belongs lower. That ranking is the useful output. It tells you which services get the JDK rebuild today and which can use the JVM-flag workaround until the next release.

The strongest case against this exercise is that you'll patch every JVM anyway, so why rank? There are two good answers. Calif says a Java program that opens a TLS connection to a malicious server can be compromised, so a service with no inbound Base64 at all still needs the update. And exploits are application-specific, with Calif withholding its chains for now. Ranking only decides order. It never removes a service from the list.

How do I check the JDK in my Spring Boot image?

The JDK version in a Spring Boot image is set when the image is built, not by the host. Qualys warns that container images bundle their own JDK, which operating system updates do not touch. How you rebuild depends on how you built the image.

Spring Boot buildpack JDK version and Java4Shell

The Spring Boot Maven plugin's build-image goal uses paketobuildpacks/builder-noble-java-tiny by default. Paketo installs BellSoft Liberica by default. BP_JVM_VERSION takes only a major version, and the buildpack installs the latest patch release. So a rebuild will only pick up a fixed build once BellSoft has shipped one and your builder has it. Check the Java version in the rebuilt image instead of assuming.

Update the JDK in a Spring Boot Docker image built with Jib

Jib's default base image is eclipse-temurin:{8,11,17,21,25}-jre, a floating tag. Rebuilding pulls whatever Temurin build the tag points to that day. As of 18 November, our sources confirm fixed builds only from Oracle and Amazon Corretto. We have not confirmed Temurin or Liberica builds with the fix, so check the Adoptium and BellSoft release notes for CVE-2026-114938 before you trust a rebuild.

Spring Boot Docker JDK update stalled? Use the flag, then restart

If no fixed build exists for your vendor yet, Calif's workaround is -XX:-UseBASE64Intrinsics. On a Paketo image you can pass it in JAVA_TOOL_OPTIONS, which the buildpack appends to its own flags. On Jib, use container.jvmFlags. The blunter -XX:UseAVX=2 stops OpenJDK starting on ARM, which matters if your build targets mixed node pools. Either flag only takes effect after a restart. Rolling a flag across a fleet is DevOps and cloud engineering work. Our separate workaround guide covers both flags in more depth.

An edge WAF helps less than you'd hope here. Cloudflare's managed rules include one for malformed Base64url JWT components and another for headers, on Pro, Business and Enterprise plans. They ship with the Log action by default, and they can't see internal traffic between services.

Is your Spring Boot API reachable before login? Decide per service

The decision comes down to one rule. A Spring Boot service on an affected JDK and an AVX-512 VBMI host that accepts Basic auth, parses tokens with java-jwt, or decodes Base64 in a public endpoint gets the fixed JDK first. If no fixed build exists for your vendor, it gets the flag now and the rebuild when one ships. A service behind the Nimbus resource server with no public decode calls goes in the next batch. No service gets skipped.

If the hard part is knowing what your auth layer actually does, that's API work, not patching. Our API development and integrations team can trace which of your Spring Boot endpoints decode credentials or tokens before authentication. We'll give you the order to rebuild them in, and help you move any public Base64 decoding behind authentication where the design allows.

Frequently asked questions

Spring Boot is not the vulnerable component; Java4Shell is a bug in the OpenJDK Base64 intrinsic. A Spring Boot app is exposed when it runs on an affected JDK, on an x86-64 CPU with AVX-512 VBMI, and passes attacker-controlled input to the java.util.Base64 basic or URL decoder, as Spring Security HTTP Basic does.

Upgrading Spring Boot does not fix Java4Shell, because the flaw is in the JDK, not the framework. As of 18 November 2026 the Spring security advisories page lists nothing for CVE-2026-114938. The fix is a patched JDK build in your image, or the -XX:-UseBASE64Intrinsics flag plus a restart until one ships.

Java4Shell affects JWT validation only if the JWT library uses the JDK decoder. The auth0 java-jwt library calls Base64.getUrlDecoder() before any signature check, so forged tokens reach the bug. Spring Security's resource server uses Nimbus and JJWT uses its own codec, so neither goes through java.util.Base64.

The JDK in a Spring Boot image is fixed at build time, so check the image, not the host. Paketo buildpacks install BellSoft Liberica by default and Jib defaults to an eclipse-temurin JRE tag. Rebuild the image, then run java -version against the rebuilt image and compare it with your vendor's fixed release.

Apache Tomcat's BasicAuthenticator decodes the Authorization header with java.util.Base64.getDecoder() before the user is authenticated. Kevin Breen of Immersive named Tomcat Basic authentication as a pre-login route to the flaw. On an affected JDK and CPU, any endpoint that accepts Basic credentials should be patched first.

Written by

Akash Mohapatra

Akash Mohapatra

Co Founder & Director

18 Nov 2026

·

8 min read

Share

LET'S CONNECT

Connect with Creuto!

Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.