Spring4Shell is CVE-2022-22965, a remote code execution vulnerability in the data binding of the Spring Framework. An attacker sends a crafted HTTP request, walks the properties of a Java object until reaching objects the application never meant to expose, and writes a file on the server. The NVD scores it 9.8, critical.
Our catalog files Spring4Shell under Fluid Attacks' weakness 184, lack of data validation. In the State of Attacks 2026 it was the most widespread weakness of all: present in 64.5% of the systems we assessed during 2025, with 40,060 vulnerabilities reported.
This page covers what Spring4Shell is, which conditions make an application exploitable, how to find the vulnerable package in a Java project, why Maven makes that search hard, how to fix it, and how to prioritize it when the severity says 9.8 and your deployment says otherwise.
What is Spring4Shell (CVE-2022-22965)?
Spring4Shell is a vulnerability in how Spring binds HTTP request parameters to the properties of Java objects. The vendor's security advisory states that "a Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding." The NVD files it as CWE-94, improper control of generation of code.
The name echoes the Log4j vulnerability disclosed four months earlier, which has caused confusion ever since. So it is worth saying what Spring4Shell is not: it is not CVE-2022-22963, which affects Spring Cloud Function, a different project disclosed the same week. Both allow code execution and both got patched in late March 2022, but they have different components, mechanisms and fixes. A scanner alert that treats them as one issue sends you to patch the wrong dependency.
How Spring4Shell works
Spring4Shell abuses binding, not Java serialization, and the distinction changes where you look. Binding maps request parameters onto the fields of a Java object, so a field named user.address.city sets the city property of address inside user.
That traversal of nested properties is the attack surface. On JDK 9 and later, a crafted parameter name walks from a bound object up through class.module.classLoader to objects belonging to the servlet container, not the application. That is why the official mitigation denies binding to class.*, Class.*, *.class.* and *.Class.*, and why upgrading Apache Tomcat to 10.0.20, 9.0.62 or 8.5.78 works as a tactical fix. Spring4Shell ends in code execution without a single flaw in your own code.
Two clarifications most write-ups get wrong. The @RequestMapping annotation is not the vulnerability; it marks the endpoint where parameters get bound. And JDK 9 is not a flawed release: it introduced the module system, and with it the accessor that made the path reachable. Spring4Shell is a failure to validate what a request may bind to, which is why our catalog files it under lack of data validation.
Which applications are actually exploitable
Having a vulnerable Spring version is not the same as being exploitable by Spring4Shell, which needs four conditions at once, all stated in the vendor advisory.
Condition | What to check in your environment |
|---|---|
JDK 9 or later | The runtime of the deployed artifact, not the one on the build machine |
Spring MVC or Spring WebFlux | A |
Apache Tomcat as servlet container | The container running in production, including one embedded by a parent image |
Traditional WAR deployment | How the artifact is packaged and deployed, not how it runs locally |
A Spring Boot application packaged as an executable JAR does not meet the fourth condition, so the known Spring4Shell path does not apply. That is where the accurate answer stops: the NVD description closes with a caveat easy to skip, that the nature of the vulnerability is more general and other ways to exploit it may exist.
These conditions tell you whether the documented attack works against you, not that nothing else does. Treat them as a triage order for Spring4Shell, not a clean bill of health. Patch regardless of where the checklist lands.
Spring4Shell at Fluid Attacks
We publish our verdict on this CVE. The entry for Spring4Shell in the Fluid Attacks Database is open to anyone, and it carries the three fields that turn a severity score into a decision: whether we detect the flaw, whether the vulnerable code is reachable, and what the severity is in context.
What our catalog says about this CVE
Our entry records the flaw as weakness 184, lack of data validation, mapped to CWE-74 and CWE-94. Detection status is yes: our Software Composition Analysis (SCA) finds it. The probability score is 99.64%, in the 99.95th percentile, among the most likely in the world to be attacked within 30 days.
One point that gets misreported: we detect Spring4Shell through SCA, not through Static Application Security Testing (SAST). Our SAST rules for Spring cover other weaknesses, such as session fixation, and are unrelated to this CVE.
Why our reachability verdict says impossible
Our entry carries a reachability capability status of impossible, at the level "sink exists but is not application-callable," in the category "framework request dispatch."
In plain terms: the vulnerable code sits in the framework's request dispatch path, not on a call path your application triggers. Reachability analysis asks whether a known vulnerable function can be invoked from your code, and for Spring4Shell it cannot be reached that way, because the framework calls it, not you.

Our database entry for CVE-2022-22965: the original 9.8, our adjusted 8.1, and the reachability verdict.
That verdict is useful and narrow. Tracing your call graph will not prove exploitability, and it does not mean the application is safe: the attack arrives through the framework's dispatch. Reachability analysis answers one question well; the deployment conditions answer the rest.
How we adjust the severity score, and what to read beside it
Our entry shows two severities: the original CVSS 3.1 of 9.8 and our adjusted CVSS-BT 4.0 of 8.1. The adjustment comes from threat and supplemental metrics, and the 1.7-point gap moves the rating one qualitative level.
The reason the number drops is specific. As our documentation on CVSS score adjustment states, Fluid Attacks "specifies the Exploit Maturity (E) metric as 'Unreported' (U) for all the vulnerabilities that SCA scans find, also when there are public exploits or reports of attacks." That is a uniform rule across every SCA finding, not a judgment about this CVE.
Which is why the same page tells you to "examine these fields before you use the adjusted score to set priorities." Those fields say a great deal here. Our entry publishes an EPSS of 99.64% and a reachability verdict that rules out one method of proof rather than risk, and CISA lists this CVE among its Known Exploited Vulnerabilities. Together they point higher than 8.1 alone suggests.
Where Maven breaks your inventory
This is the problem most teams hit with Spring4Shell, and it is specific to Java. Our documentation on supported lock files is direct: "Maven does not create a lock file." And without one, "Fluid Attacks analyzes only the direct dependencies of pom.xml."
Now consider where the vulnerable code lives: in spring-beans. Almost nobody declares that package in their pom.xml. It arrives as a transitive dependency, through spring-boot-starter-web or spring-boot-starter-webflux. In a Maven project without a lock file, it is precisely the kind of package the scan does not see.
Our recommendation, from the same page, is to move to Gradle with dependency locking. If you keep Maven, declare an exact version for each dependency and enforce it with the banDynamicVersions rule of the Maven Enforcer Plugin. Otherwise your inventory lists what you asked for, not what shipped.
The practice that decides the rest
Finding and patching are not fixing. On our platform, a vulnerability closes when a reattack confirms the fix works, not when someone marks a ticket done. That catches the two failure modes common to a transitive dependency: an artifact rebuilt without the updated package, and a parent POM that pins the old version back.
How to find Spring4Shell in a Java project
Start from the deployed artifact, not the manifest. The question is which version of spring-beans sits inside the WAR you shipped, and mvn dependency:tree or gradle dependencies answers that better than pom.xml.
The packages that carry Spring4Shell, and the version that fixes each, come from the OSV entry for this CVE:
Maven package | Affected range | Fixed in |
|---|---|---|
| Below 5.2.20.RELEASE, and 5.3.0 to 5.3.17 | 5.2.20.RELEASE · 5.3.18 |
| Below 5.2.20.RELEASE, and 5.3.0 to 5.3.17 | 5.2.20.RELEASE · 5.3.18 |
| Below 5.2.20.RELEASE, and 5.3.0 to 5.3.17 | 5.2.20.RELEASE · 5.3.18 |
| Below 2.5.12, and 2.6.0 to 2.6.5 | 2.5.12 · 2.6.6 |
| Below 2.5.12, and 2.6.0 to 2.6.5 | 2.5.12 · 2.6.6 |

The same version matrix in our own catalog, with the Debian packages the Maven table leaves out.
Read those ranges carefully: 5.2.20.RELEASE through 5.2.x and 2.5.12 through 2.5.x fall between the two ranges and are not listed as affected. Three traps. A version range in the manifest means two builds install different versions, so what you tested is not what you deployed. A shaded JAR can carry a vulnerable spring-beans no dependency tree reports. And a base image brings its own Tomcat, changing the Spring4Shell answer without changing your code.
How to fix Spring4Shell
Upgrade the framework to 5.3.18 or 5.2.20.RELEASE. On Spring Boot, upgrade to 2.6.6 or 2.5.12. Those are the first fixed releases of their branches, which is why "anything above 5.2.20" is wrong: 5.2.20.RELEASE itself is the fix for Spring4Shell.
Fixing Spring4Shell in a dependency you did not declare is rarely a one-line change, so our documentation on updating dependencies gives three remediation paths:
Minimal fix: resolves the reported vulnerability, and may introduce others.
Safe update: resolves it without adding new known vulnerabilities.
Complete fix: moves to the most recent version with no known vulnerabilities.
For flaws inherited from sub-dependencies, the platform identifies the direct package pulling in the vulnerable code, so you change what you control. Then rebuild, redeploy and reattack to confirm production no longer carries the vulnerable version.
If you cannot upgrade yet, Spring published workarounds in its early announcement, including downgrading to JDK 8 and restricting which fields binding may touch. Those are a holding position, not a resolution.
Spring4Shell vs. Log4Shell
Both are code execution flaws in widely used Java components, both were exploited in the wild, both carry a 9.8 score. Their differences decide your response.
Spring4Shell | Log4Shell (CVE-2021-44228) | |
|---|---|---|
Component | Spring, web layer | Log4j 2, logging library |
Mechanism | Binding over nested properties | JNDI lookup inside a logged string |
Conditions to exploit | Four, all required at once | Essentially one: input reaches a log call |
Entry point | A bound request parameter | Any logged value, anywhere in the stack |
Finding the package | Hard: arrives through starters | Hard: often bundled inside other software |
Our reachability verdict | Impossible, framework request dispatch | See our Log4j catalog entry |
The practical gap is the condition count. The Log4j flaw needed an attacker-controlled string to reach a log statement, close to a default in most applications. Spring4Shell needs a specific runtime, framework, container and packaging combination, which makes it narrower in reach and harder to triage: answering "are we affected" takes an inventory of deployment facts, not just dependencies.
How to prioritize a critical CVE that may not be exploitable
Use four inputs, in this order, and never one alone.
Evidence of real exploitation comes first. CISA added Spring4Shell to its Known Exploited Vulnerabilities catalog on April 4, 2022, with a due date of April 25 for federal agencies, the standard 21-day window. A place in that catalog means confirmed exploitation, which outranks any modeled estimate.
Probability comes second. EPSS at 99.64% for Spring4Shell forecasts near-term attack attempts, and it belongs next to that entry, not instead of it.
Deployment context comes third. The four conditions decide whether the documented path applies to your artifact. A severity score cannot carry this input, which is why two organizations with the same CVE rank it differently and both are right.
Severity comes last, as a tiebreaker. The 9.8 on Spring4Shell tells you the worst case if everything lines up, not whether anything lines up for you. Vulnerability management that orders work by score alone patches an unreachable critical before an exploited high, every time.
Conclusions
Spring4Shell is a narrow vulnerability with a wide reputation. The exploit documented in 2022 needs JDK 9 or later, Spring MVC or WebFlux, Tomcat and WAR packaging at once, so many applications carrying the vulnerable package were never exploitable that way. That is no reason to skip the upgrade: the NVD notes Spring4Shell is more general than its known path.
What makes Spring4Shell worth revisiting is the inventory problem behind it. The vulnerable code lives in spring-beans, a package almost nobody declares and almost everybody ships. Fix that, with exact versions and a lock file, and the next critical dependency CVE becomes a question you answer in an afternoon instead of a week. The answers to open-source component risk get built before the CVE is published, not after.
Frequently asked questions
Is a Spring Boot executable JAR safe from Spring4Shell?
The publicly known exploit path does not apply to it, because it requires a traditional WAR deployment on Tomcat. "Not exploitable through the documented path" is not "safe," though: the NVD states the vulnerability is more general and other routes may exist. Upgrade regardless of packaging.
What is the difference between CVE-2022-22965 and CVE-2022-22963?
Spring4Shell is the first of the two, a flaw in how Spring binds request parameters. CVE-2022-22963 is a separate one in Spring Cloud Function, a different project. They were disclosed in the same week of March 2022, which is why they get confused, but they affect different components and need different fixes.
Which Spring versions fix Spring4Shell?
Spring Framework 5.3.18 and 5.2.20.RELEASE, and Spring Boot 2.6.6 and 2.5.12. Those are the first patched releases of each branch, so any later version in the branch carries the fix. On a branch older than 5.2 there is no patch; move to a supported one.
Can an SCA scan tell me whether I am actually exploitable?
No, and that gap is the point. A scan tells you a vulnerable component is present. Our entry for Spring4Shell pairs an EPSS of 99.64% with a reachability status of impossible, at the level "sink exists but is not application-callable": the call graph rules out one proof, not the risk, because the framework dispatches the request, not your code. Exploitability still takes deployment facts: runtime, framework, container and packaging.
Does Fluid Attacks detect Spring4Shell?
Yes, through software composition analysis, which identifies the vulnerable Spring packages and reports the version that fixes each. Our SAST rules for Spring cover other weaknesses, unrelated to this CVE. For Maven projects, note the limit above: without a lock file our scan reads only the direct dependencies in pom.xml. Our continuous penetration testing and Pentesting as a Service (PTaaS) add the exploitability evidence a scan cannot produce alone.
Know which of your dependencies ship vulnerable code
The next Spring4Shell is already in your dependency tree: our scanners and pentesters inventory your components, test whether the risk is real in your deployment, and verify each fix with a reattack. Start free trial · Contact us.
Get started with Fluid Attacks' SCA solution right now















