Skip to content
CVE IDCVE-2022-22965GitHub advisory IDGHSA-36p3-wjmg-h94x

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).

Critical9.8Known exploitedFix availableGitHub reviewed

Published 31 Mar 2022Updated 22 Oct 2025

9.8CriticalCVSS 3.1
EPSS
99.63%higher than 99.9% of CVEs
Weaknesses (CWE)
  • CWE-74Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-94Improper Control of Generation of Code ('Code Injection')
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-webmvc or spring-webflux dependency

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:H

Critical9.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-beans
    Maven
    pkg:maven/org.springframework/spring-beans
    Affected versions
    >= 5.3.0, < 5.3.18
    < 5.2.20.RELEASE
    Fixed in
    5.2.20.RELEASE
    5.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-webmvc
    Maven
    pkg:maven/org.springframework/spring-webmvc
    Affected versions
    >= 5.3.0, < 5.3.18
    < 5.2.20.RELEASE
    Fixed in
    5.2.20.RELEASE
    5.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-web
    Maven
    pkg:maven/org.springframework.boot/spring-boot-starter-web
    Affected versions
    < 2.5.12
    >= 2.6.0, < 2.6.6
    Fixed in
    2.5.12
    2.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-webflux
    Maven
    pkg:maven/org.springframework/spring-webflux
    Affected versions
    >= 5.3.0, < 5.3.18
    < 5.2.20.RELEASE
    Fixed in
    5.2.20.RELEASE
    5.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-webflux
    Maven
    pkg:maven/org.springframework.boot/spring-boot-starter-webflux
    Affected versions
    < 2.5.12
    >= 2.6.0, < 2.6.6
    Fixed in
    2.5.12
    2.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

Fix

Source: OSV (GitHub advisory)

Fix available

  • org.springframework:spring-beans: upgrade to 5.2.20.RELEASE or 5.3.18, depending on your release line
  • org.springframework:spring-webmvc: upgrade to 5.2.20.RELEASE or 5.3.18, depending on your release line
  • org.springframework.boot:spring-boot-starter-web: upgrade to 2.5.12 or 2.6.6, depending on your release line
  • org.springframework:spring-webflux: upgrade to 5.2.20.RELEASE or 5.3.18, depending on your release line
  • org.springframework.boot:spring-boot-starter-webflux: upgrade to 2.5.12 or 2.6.6, depending on your release line

Patch commits

  • 002546bPatch commitgithub.com/spring-projects/spring-framework

    Refine PropertyDescriptor filtering

    +14 −4 across 1 file

    • spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java+14 −4

Release commits

The commits each fixed release tag points at. They usually bump the version rather than contain the fix itself.

  • cfa701bRelease commit5.2.20github.com/spring-projects/spring-framework
  • 707a24cRelease commit5.3.18github.com/spring-projects/spring-framework

Vulnerability intelligence

References

Credits

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.