CVE DatabaseCVE-2022-22947
한국어 권고문 →
CVE-2022-2294710.0/CRITICALCISA KEVCWE-94CWE-917

Spring Cloud Gateway Remote Code Execution (RCE) Vulnerability Analysis and Mitigation Guide (CVE-2022-22947)

⚡ Jump to Patch
Affected Vendors
vmware, spring
Affected Components
spring_cloud_gateway
Published Date
2022-03-03
CVSS v3.1
10.0
CRITICAL
EPSS (30d)
98.3%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Spring Cloud Gateway versions prior to 3.1.1 and 3.0.7, where the Gateway Actuator endpoint is enabled, exposed, and unsecured

Impact

Unauthenticated remote attackers can execute arbitrary system commands on the host by sending maliciously crafted HTTP requests

Mitigation

Immediately upgrade Spring Cloud Gateway to version 3.1.1, 3.0.7, or higher, and disable or secure the Gateway Actuator endpoint

Affected Products & Version Scope

Spring Cloud Gateway versions 3.1.0 (prior to 3.1.1) and 3.0.0 through 3.0.6 (prior to 3.0.7)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The recommended remediation is to upgrade Spring Cloud Gateway to a patched version (3.1.1+ or 3.0.7+).

For Maven (pom.xml):

xml
<!-- pom.xml -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-gateway</artifactId>
    <version>3.1.1</version>
</dependency>

For Gradle (build.gradle):

groovy
// build.gradle
dependencies {
    implementation 'org.springframework.cloud:spring-cloud-starter-gateway:3.1.1'
}

2. Temporary Workaround & Hardening Configuration

If upgrading immediately is not feasible, disable the Gateway Actuator endpoint or restrict access.

Disable the Gateway Actuator in application.properties or application.yml:

yaml
# application.yml
management:
  endpoint:
    gateway:
      enabled: false # Disable the Gateway Actuator endpoint

If the Actuator is required, secure it using Spring Security to restrict access to authorized administrators only:

java
// SecurityConfig.java
@Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
    http
        .authorizeExchange()
        .pathMatchers('/actuator/**').hasRole('ADMIN')
        .anyExchange().permitAll()
        .and().httpBasic();
    return http.build();
}

3. Log Audit & IoC Verification Commands

Use the following shell script to scan web server access logs for potential exploitation attempts targeting the Actuator endpoints.

bash
#!/bin/bash
# Scan access logs for route creation and refresh requests
LOG_FILE='/var/log/nginx/access.log' # Adjust path to your environment

echo '[*] Scanning for potential CVE-2022-22947 exploitation attempts...'
grep -E 'POST .*/actuator/gateway/routes/' "$LOG_FILE" && echo '[!] Warning: Route creation attempts detected!'
grep -E 'POST .*/actuator/gateway/refresh' "$LOG_FILE" && echo '[!] Warning: Gateway refresh attempts detected!'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Immediately upgrade Spring Cloud Gateway to version 3.1.1 or 3.0.7+ and ensure that Actuator endpoints are secured or disabled.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2022-22947) exists in Spring Cloud Gateway when the Gateway Actuator endpoint is enabled and exposed without proper authentication. When an attacker dynamically adds a new route, they can inject Spring Expression Language (SpEL) expressions into the filter definitions [1, CWE-94, CWE-917]. When the gateway subsequently refreshes the routes, these SpEL expressions are evaluated and executed on the server side without adequate sanitization.

2. Exploitation Mechanics & Attack Scenario

An attacker initiates the exploit by sending a POST request to the unsecured /actuator/gateway/routes/{id} endpoint to inject a malicious SpEL payload inside a filter parameter (e.g., AddResponseHeader). Next, the attacker triggers a POST request to /actuator/gateway/refresh to apply the new configuration. During the refresh process, the gateway's internal ShortcutConfigurable interface parses the filter parameters and invokes the SpEL parser, executing the injected payload within the JVM context.

3. Infrastructure & Business Impact

With a CVSS score of 10.0, this vulnerability is classified as Critical and is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog due to active in-the-wild exploitation. Since Spring Cloud Gateway typically serves as the entry point (API Gateway) for microservices architectures, compromise of this component allows attackers to perform lateral movement, exfiltrate sensitive data, deploy ransomware, and completely compromise the internal network infrastructure.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2022-22947)

FAQ

Q1. How critical is CVE-2022-22947 and is it actively exploited in the wild?

CVE-2022-22947 is rated CVSS 10.0 (CRITICAL) with a 30-day EPSS exploitation probability of 98.3%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2022-22947?

Primary impacted vendors include vmware, spring across spring_cloud_gateway. Scope summary: Spring Cloud Gateway versions 3.1.0 (prior to 3.1.1) and 3.0.0 through 3.0.6 (prior to 3.0.7)

Q3. What temporary mitigations or workarounds exist for CVE-2022-22947 before patching?

[Mitigation] Immediately upgrade Spring Cloud Gateway to version 3.1.1, 3.0.7, or higher, and disable or secure the Gateway Actuator endpoint Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2022-22947

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (vmware)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2022-22947 Spring Cloud Gateway Remote Code Execution (RCE) Vulnerability Analysis and Mitigation Guide (CVE-2022-22947) (CVSS 10.0) - Patch & Workaround | CVE Pulse