# CVE-2022-22965 (Spring4Shell): Spring Framework JDK 9+ Remote Code Execution

> Attackers can achieve remote code execution in Spring MVC or WebFlux applications deployed as WARs on Tomcat with JDK 9+ via unsafe data binding.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 4 Apr 2022 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Apr 2022
- **Updated:** 21 Oct 2025
- **Also known as:** CLSA-2025-1758845168, CLSA-2026-1781571260, DEBIAN-CVE-2022-22965, GHSA-36p3-wjmg-h94x, ROOT-APP-MAVEN-CVE-2022-22965, UBUNTU-CVE-2022-22965, USN-7165-1

## What is CVE-2022-22965?

CVE-2022-22965 (Spring4Shell) is a critical code injection vulnerability in Oracle Communications Cloud Native Core Automated Test Suite, published on 1 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2022-22965?

20 open source packages ship an affected version, including org.springframework.boot:spring-boot-starter-web, org.springframework.boot:spring-boot-starter-webflux and org.springframework:spring-beans. It affects 38 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.boot:spring-boot-starter-web` | Maven | All versions | 2.5.12 |
| `org.springframework.boot:spring-boot-starter-web` | Maven | All versions | 2.5.12 |
| `org.springframework.boot:spring-boot-starter-web` | Maven | From 2.6.0 | 2.6.6 |
| `org.springframework.boot:spring-boot-starter-web` | Maven | From 2.6.0 | 2.6.6 |
| `org.springframework.boot:spring-boot-starter-webflux` | Maven | All versions | 2.5.12 |
| `org.springframework.boot:spring-boot-starter-webflux` | Maven | All versions | 2.5.12 |
| `org.springframework.boot:spring-boot-starter-webflux` | Maven | From 2.6.0 | 2.6.6 |
| `org.springframework.boot:spring-boot-starter-webflux` | Maven | From 2.6.0 | 2.6.6 |
| `org.springframework:spring-beans` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-beans` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-beans` | Maven | From 5.3.0 | 5.3.18 |
| `org.springframework:spring-beans` | Maven | From 5.3.0 | 5.3.18 |
| `org.springframework:spring-webflux` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-webflux` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-webflux` | Maven | From 5.3.0 | 5.3.18 |
| `org.springframework:spring-webflux` | Maven | From 5.3.0 | 5.3.18 |
| `org.springframework:spring-webmvc` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-webmvc` | Maven | All versions | 5.2.20.RELEASE |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 | 5.3.18 |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 | 5.3.18 |

Products: Cisco Cx Cloud Agent, Oracle Commerce Platform, Oracle Communications Cloud Native Core Automated Test Suite, Oracle Communications Cloud Native Core Binding Support Function, Oracle Communications Cloud Native Core Console, Oracle Communications Cloud Native Core Network Exposure Function, Oracle Communications Cloud Native Core Network Function Cloud Native Environment, Oracle Communications Cloud Native Core Network Repository Function, Oracle Communications Cloud Native Core Network Slice Selection Function, Oracle Communications Cloud Native Core Policy, Oracle Communications Cloud Native Core Security Edge Protection Proxy, Oracle Communications Cloud Native Core Unified Data Repository, Oracle Communications Policy Management, Oracle Communications Unified Inventory Management, Oracle Financial Services Analytical Applications Infrastructure, Oracle Financial Services Behavior Detection Platform, Oracle Financial Services Enterprise Case Management, Oracle Mysql Enterprise Monitor, Oracle Product Lifecycle Analytics, Oracle Retail Bulk Data Integration and 18 more.

## How do I fix CVE-2022-22965?

Upgrade org.springframework.boot:spring-boot-starter-web to a fixed version for your release line: 2.5.12 or 2.6.6. US federal agencies must fix it by 25 Apr 2022.

## Is CVE-2022-22965 being exploited?

Yes. Attackers have exploited CVE-2022-22965 in the wild since at least 4 Apr 2022.

Public exploit code:

- Spring4Shell Proof Of Concept/And vulnerable application CVE-2022-22965 (github_poc): https://github.com/BobTheShoplifter/Spring4Shell-POC
- Dockerized Spring4Shell (CVE-2022-22965) PoC application and exploit (github_poc): https://github.com/reznok/Spring4Shell-POC
- burpsuite 的Spring漏洞扫描插件。SpringVulScan：支持检测：路由泄露|CVE-2022-22965|CVE-2022-22963|CVE-2022-22947|CVE-2016-4977 (github_poc): https://github.com/tpt11fb/SpringVulScan
- Spring4Shell - Spring Core RCE - CVE-2022-22965 (github_poc): https://github.com/TheGejr/SpringShell
- CVE-2022-22965\Spring-Core-RCE核弹级别漏洞的rce图形化GUI一键利用工具，基于JavaFx开发，图形化操作更简单，提高效率。 (github_poc): https://github.com/zangcc/CVE-2022-22965-rexbb
- Spring Framework RCE (CVE-2022-22965) Nmap (NSE) Checker (Non-Intrusive) (github_poc): https://github.com/alt3kx/CVE-2022-22965

## Other vulnerabilities in Oracle Communications Cloud Native Core Automated Test Suite

- [CVE-2023-20043](https://insights.sbomify.com/CVE-2023-20043/): Privilege escalation in Cisco CX Cloud Agent (medium 6.7)
- [CVE-2023-20044](https://insights.sbomify.com/CVE-2023-20044/): Privilege escalation in Cisco CX Cloud Agent (medium 6.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-22965 (Spring4Shell) and fix it if it is affected.

What it is: CVE-2022-22965 (Spring4Shell) is a critical code injection vulnerability in Oracle Communications Cloud Native Core Automated Test Suite, published on 1 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2022-22965 in the wild since at least 4 Apr 2022.

Affected packages and fixed versions:
- org.springframework.boot:spring-boot-starter-web (Maven): affected all versions; fixed in 2.5.12
- org.springframework.boot:spring-boot-starter-web (Maven): affected all versions; fixed in 2.5.12
- org.springframework.boot:spring-boot-starter-web (Maven): affected from 2.6.0; fixed in 2.6.6
- org.springframework.boot:spring-boot-starter-web (Maven): affected from 2.6.0; fixed in 2.6.6
- org.springframework.boot:spring-boot-starter-webflux (Maven): affected all versions; fixed in 2.5.12
- org.springframework.boot:spring-boot-starter-webflux (Maven): affected all versions; fixed in 2.5.12
- org.springframework.boot:spring-boot-starter-webflux (Maven): affected from 2.6.0; fixed in 2.6.6
- org.springframework.boot:spring-boot-starter-webflux (Maven): affected from 2.6.0; fixed in 2.6.6
- org.springframework:spring-beans (Maven): affected all versions; fixed in 5.2.20.RELEASE
- org.springframework:spring-beans (Maven): affected all versions; fixed in 5.2.20.RELEASE
- org.springframework:spring-beans (Maven): affected from 5.3.0; fixed in 5.3.18
- org.springframework:spring-beans (Maven): affected from 5.3.0; fixed in 5.3.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-22965/ (Markdown: https://insights.sbomify.com/CVE-2022-22965/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-22965
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-22965
- OSV: https://osv.dev/vulnerability/CVE-2022-22965

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-22965/
Summaries are generated and may contain mistakes; the official description above is the record.
