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

Goal: 1000 CNY · Raised: 1310 CNY

100%

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
CVE-2022-22965 proof of concept for CS4239 report 
Readme
# CS4239-Spring4Shell-POC

Proof of concept for CVE-2022-22965 (Spring4Shell) for CS4239 G410 report. Adapted from [this PoC](https://github.com/lunasec-io/Spring4Shell-POC) to demonstrate unpatched & patched behavior.

## Running the demo

There are 2 example programs (dockerized) in this repository with identical source code. One uses a vulnerable version of Spring Boot while the other uses a patched version. Tomcat also released a patch for this vulnerability, but the same vulnerable version of Tomcat is used for this demo to isolate the effects of the Spring patch.

To run demo apps:

```sh
docker compose build
docker compose up
```

- vulnerable:
  - [localhost:8080/helloworld/greeting](http://localhost:8080/helloworld/greeting)
  - tomcat 9.0.56 (vulnerable), spring boot 2.6.3 (depends on vulnerable spring framework 5.3.15)
- patched:
  - [localhost:8081/helloworld/greeting](http://localhost:8081/helloworld/greeting)
  - tomcat 9.0.56 (vulnerable), spring boot 2.6.6 (depends on patched spring framework 5.3.18)

To run exploit:

```sh
# vulnerable
python exploit.py --url "http://localhost:8080/helloworld/greeting"

# patched
python exploit.py --url "http://localhost:8081/helloworld/greeting"
```

If exploit works, a new page that allows us to run commands will be present. Example of running `id`:

```txt
http://localhost:8080/shell.jsp?cmd=id
```

Exploit does not work for patched version - `shell.jsp` is not injected.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →