Remote Code Execution in Spring Framework
CVE-2022-22965 (GitHub advisory GHSA-36p3-wjmg-h94x) is a critical-severity vulnerability with a CVSS 3.1 base score of 9.8, classed as Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74), in 5 packages, including org.springframework:spring-beans (Maven) and org.springframework:spring-webmvc (Maven). Fixed versions: org.springframework:spring-beans 5.2.20.RELEASE or 5.3.18; org.springframework:spring-webmvc 5.2.20.RELEASE or 5.3.18; and 3 more packages. CISA lists it as a known exploited vulnerability (added 4 Apr 2022).
Published 31 Mar 2022Updated 22 Oct 2025
- CVE ID
- CVE-2022-22965
- GHSA ID
- GHSA-36p3-wjmg-h94x
- EPSS
- 99.63%higher than 99.9% of CVEs
- Weaknesses (CWE)
- KEV status
- Known exploitedAdded 4 Apr 2022
- Published
- 31 Mar 2022
- Updated
- 22 Oct 2025
- Ecosystem
- Maven
- Assigned by (CNA)
- vmware
Summary
Source: OSV (GitHub advisory)
Spring Framework prior to versions 5.2.20 and 5.3.18 contains a remote code execution vulnerability known as Spring4Shell.
Impact
A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.
These are the prerequisites for the exploit:
- JDK 9 or higher
- Apache Tomcat as the Servlet container
- Packaged as WAR
spring-webmvcorspring-webfluxdependency
Patches
Workarounds
For those who are unable to upgrade, leaked reports recommend setting disallowedFields on WebDataBinder through an @ControllerAdvice. This works generally, but as a centrally applied workaround fix, may leave some loopholes, in particular if a controller sets disallowedFields locally through its own @InitBinder method, which overrides the global setting.
To apply the workaround in a more fail-safe way, applications could extend RequestMappingHandlerAdapter to update the WebDataBinder at the end after all other initialization. In order to do that, a Spring Boot application can declare a WebMvcRegistrations bean (Spring MVC) or a WebFluxRegistrations bean (Spring WebFlux).
Technical details
Source: GitHub Advisory Database
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:HCritical9.8Base score from GitHub Advisory Database
- Attack Vector AV
- Network
- Attack Complexity AC
- Low
- Privileges Required PR
- None
- User Interaction UI
- None
- Scope S
- Unchanged
- Confidentiality C
- High
- Integrity I
- High
- Availability A
- High
- Exploit Code Maturity E
- High
CISA SSVC decision points
- Exploitation
- active
- Exploited in the wild
- Automatable
- yes
- Attackers can automate this at scale
- Technical impact
- total
- Full control of the affected system
CISA Coordinator assessment (SSVC 2.0.3) via CVE.org.
CISA required action
Apply updates per vendor instructions.
Federal agencies must remediate by 25 Apr 2022.
Affected packages
Source: OSV (GitHub advisory)
- org.springframework:spring-beansMaven
pkg:maven/org.springframework/spring-beans- Affected versions
- >= 5.3.0, < 5.3.18< 5.2.20.RELEASE
- Fixed in
- 5.2.20.RELEASE5.3.18
Show 215 listed versions
- 1.0
- 1.0-m4
- 1.0-rc1
- 1.0.1
- 1.2
- 1.2-rc1
- 1.2-rc2
- 1.2.1
- 1.2.2
- 1.2.3
- 1.2.4
- 1.2.5
- org.springframework:spring-webmvcMaven
pkg:maven/org.springframework/spring-webmvc- Affected versions
- >= 5.3.0, < 5.3.18< 5.2.20.RELEASE
- Fixed in
- 5.2.20.RELEASE5.3.18
Show 222 listed versions
- 1.0
- 1.0-rc1
- 1.0.1
- 1.1
- 1.1-rc1
- 1.1-rc2
- 1.1.1
- 1.1.2
- 1.1.3
- 1.1.4
- 1.1.5
- 1.2
- org.springframework.boot:spring-boot-starter-webMaven
pkg:maven/org.springframework.boot/spring-boot-starter-web- Affected versions
- < 2.5.12>= 2.6.0, < 2.6.6
- Fixed in
- 2.5.122.6.6
Show 153 listed versions
- 1.0.0.RELEASE
- 1.0.1.RELEASE
- 1.0.2.RELEASE
- 1.1.0.RELEASE
- 1.1.1.RELEASE
- 1.1.10.RELEASE
- 1.1.11.RELEASE
- 1.1.12.RELEASE
- 1.1.2.RELEASE
- 1.1.3.RELEASE
- 1.1.4.RELEASE
- 1.1.5.RELEASE
- org.springframework:spring-webfluxMaven
pkg:maven/org.springframework/spring-webflux- Affected versions
- >= 5.3.0, < 5.3.18< 5.2.20.RELEASE
- Fixed in
- 5.2.20.RELEASE5.3.18
Show 80 listed versions
- 5.0.0.RELEASE
- 5.0.1.RELEASE
- 5.0.10.RELEASE
- 5.0.11.RELEASE
- 5.0.12.RELEASE
- 5.0.13.RELEASE
- 5.0.14.RELEASE
- 5.0.15.RELEASE
- 5.0.16.RELEASE
- 5.0.17.RELEASE
- 5.0.18.RELEASE
- 5.0.19.RELEASE
- org.springframework.boot:spring-boot-starter-webfluxMaven
pkg:maven/org.springframework.boot/spring-boot-starter-webflux- Affected versions
- < 2.5.12>= 2.6.0, < 2.6.6
- Fixed in
- 2.5.122.6.6
Show 88 listed versions
- 2.0.0.RELEASE
- 2.0.1.RELEASE
- 2.0.2.RELEASE
- 2.0.3.RELEASE
- 2.0.4.RELEASE
- 2.0.5.RELEASE
- 2.0.6.RELEASE
- 2.0.7.RELEASE
- 2.0.8.RELEASE
- 2.0.9.RELEASE
- 2.1.0.RELEASE
- 2.1.1.RELEASE
| Package | Affected versions | Fixed in |
|---|---|---|
org.springframework:spring-beans Maven pkg:maven/org.springframework/spring-beans |
Show 215 listed versions
|
|
org.springframework:spring-webmvc Maven pkg:maven/org.springframework/spring-webmvc |
Show 222 listed versions
|
|
org.springframework.boot:spring-boot-starter-web Maven pkg:maven/org.springframework.boot/spring-boot-starter-web |
Show 153 listed versions
|
|
org.springframework:spring-webflux Maven pkg:maven/org.springframework/spring-webflux |
Show 80 listed versions
|
|
org.springframework.boot:spring-boot-starter-webflux Maven pkg:maven/org.springframework.boot/spring-boot-starter-webflux |
Show 88 listed versions
|
|
Fix
Source: OSV (GitHub advisory)
Fix available
- org.springframework:spring-beans: upgrade to
5.2.20.RELEASEor5.3.18, depending on your release line - org.springframework:spring-webmvc: upgrade to
5.2.20.RELEASEor5.3.18, depending on your release line - org.springframework.boot:spring-boot-starter-web: upgrade to
2.5.12or2.6.6, depending on your release line - org.springframework:spring-webflux: upgrade to
5.2.20.RELEASEor5.3.18, depending on your release line - org.springframework.boot:spring-boot-starter-webflux: upgrade to
2.5.12or2.6.6, depending on your release line
Patch commits
Refine PropertyDescriptor filtering
+14 −4 across 1 file
- spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java+14 −4
Vulnerability intelligence
Root cause analysis
Vulnerable functions
References
Advisories 4
Other links 14
- cert-portal.siemens.com/productcert/pdf/ssa-254054.pdf
- github.com/spring-projects/spring-boot/releases/tag/v2.5.12
- github.com/spring-projects/spring-boot/releases/tag/v2.6.6
- github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE
- github.com/spring-projects/spring-framework/releases/tag/v5.3.18
- psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005
Credits
- rotilhoanalyst
- cdupuisanalyst
- briandealwisanalyst
Questions about CVE-2022-22965
- What is the GHSA ID for CVE-2022-22965?
- GitHub tracks CVE-2022-22965 as GHSA-36p3-wjmg-h94x.
- What is the CVSS score of CVE-2022-22965?
- CVE-2022-22965 has a CVSS 3.1 base score of 9.8 (Critical), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H.
- Which versions are affected by CVE-2022-22965?
- org.springframework:spring-beans (Maven): >= 5.3.0, < 5.3.18; < 5.2.20.RELEASE. org.springframework:spring-webmvc (Maven): >= 5.3.0, < 5.3.18; < 5.2.20.RELEASE. org.springframework.boot:spring-boot-starter-web (Maven): < 2.5.12; >= 2.6.0, < 2.6.6. org.springframework:spring-webflux (Maven): >= 5.3.0, < 5.3.18; < 5.2.20.RELEASE. org.springframework.boot:spring-boot-starter-webflux (Maven): < 2.5.12; >= 2.6.0, < 2.6.6.
- How do I fix CVE-2022-22965?
- Upgrade each package to its fixed version: org.springframework:spring-beans 5.2.20.RELEASE or 5.3.18; org.springframework:spring-webmvc 5.2.20.RELEASE or 5.3.18; org.springframework.boot:spring-boot-starter-web 2.5.12 or 2.6.6; org.springframework:spring-webflux 5.2.20.RELEASE or 5.3.18; and 1 more packages. The fix is in commit 002546b.
- What is the Package URL (PURL) for CVE-2022-22965?
- The affected packages' PURLs are pkg:maven/org.springframework/spring-beans, pkg:maven/org.springframework/spring-webmvc, pkg:maven/org.springframework.boot/spring-boot-starter-web, pkg:maven/org.springframework/spring-webflux and pkg:maven/org.springframework.boot/spring-boot-starter-webflux.
- Is CVE-2022-22965 exploited in the wild?
- CISA lists it as a known exploited vulnerability (added 4 Apr 2022). CISA's SSVC assessment rates exploitation as "active". EPSS estimates a 99.63% chance of exploitation in the next 30 days, higher than 99.9% of CVEs.
Data sources
Upstream records
- OSV (GitHub advisory)LoadedRaw JSON
- GitHub Advisory DatabaseLoadedRaw JSON
- OSV (CVE record)LoadedRaw JSON
- CVE.orgLoaded
- CISA KEV catalogLoaded
Fetched 2 days ago (13 Oct 2026, 12:17 UTC). Records refresh automatically after 24 hours.
Where each part of this page came from
- Title and description
- OSV (GitHub advisory)
- Severity score
- GitHub Advisory Database
- Weakness (CWE)
- GitHub Advisory Database
- Affected packages
- OSV (GitHub advisory)
- Fix
- OSV (GitHub advisory)
- References
- Computed by CVEminer
- SSVC
- CVE.org
- KEV status
- CISA KEV catalog
- EPSS
- GitHub Advisory Database
OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.