# CVE-2022-22947: VMware Spring Cloud Gateway Code Injection

> Remote attackers can execute arbitrary code on hosts using Spring Cloud Gateway if the Actuator endpoint is enabled and unsecured.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 16 May 2022 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2022
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-3gx9-37ww-9qw6

## What is CVE-2022-22947?

CVE-2022-22947 is a critical code injection vulnerability in Oracle Commerce Guided Search, published on 3 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In spring cloud gateway versions prior to 3.1.1+ and 3.0.7+ , applications are vulnerable to a code injection attack when the Gateway Actuator endpoint is enabled, exposed and unsecured. A remote attacker could make a maliciously crafted request that could allow arbitrary remote execution on the remote host.

Weakness: CWE-917 (Improper Neutralization of Special Elements used in an Expression Language Statement), CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2022-22947?

4 open source packages ship an affected version, including org.springframework.cloud:spring-cloud-gateway. It affects 10 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.cloud:spring-cloud-gateway` | Maven | All versions | 3.0.7 |
| `org.springframework.cloud:spring-cloud-gateway` | Maven | All versions | 3.0.7 |
| `org.springframework.cloud:spring-cloud-gateway` | Maven | From 3.1.0 | 3.1.1 |
| `org.springframework.cloud:spring-cloud-gateway` | Maven | From 3.1.0 | 3.1.1 |

Products: Oracle Commerce Guided Search, Oracle Communications Cloud Native Core Binding Support Function, Oracle Communications Cloud Native Core Console, Oracle Communications Cloud Native Core Network Exposure Function, Oracle Communications Cloud Native Core Network Function Cloud Native Environment, Oracle Communications Cloud Native Core Network Repository Function, Oracle Communications Cloud Native Core Network Slice Selection Function, Oracle Communications Cloud Native Core Security Edge Protection Proxy, Oracle Communications Cloud Native Core Service Communication Proxy, Vmware Spring Cloud Gateway.

## How do I fix CVE-2022-22947?

Upgrade org.springframework.cloud:spring-cloud-gateway to a fixed version for your release line: 3.0.7 or 3.1.1. US federal agencies must fix it by 6 Jun 2022.

## Is CVE-2022-22947 being exploited?

Yes. Attackers have exploited CVE-2022-22947 in the wild since at least 16 May 2022.

Public exploit code:

- CVE-2022-22947 (github_poc): https://github.com/lucksec/Spring-Cloud-Gateway-CVE-2022-22947
- CVE-2022-22947 注入Godzilla内存马 (github_poc): https://github.com/whwlsfb/cve-2022-22947-godzilla-memshell
- Spring Cloud Gateway 远程代码执行漏洞Exp Spring_Cloud_Gateway_RCE_Exp-CVE-2022-22947 (github_poc): https://github.com/SecNN/CVE-2022-22947_Rce_Exp
- CVE-2022-22947批量 (github_poc): https://github.com/tangxiaofeng7/CVE-2022-22947-Spring-Cloud-Gateway
- Spring Cloud Gateway Actuator API SpEL表达式注入命令执行（CVE-2022-22947） 注入哥斯拉内存马 (github_poc): https://github.com/0730Nophone/CVE-2022-22947-
- Spring Cloud Gateway < 3.0.7 & < 3.1.1 Code Injection (RCE) (github_poc): https://github.com/crowsec-edtech/CVE-2022-22947

## Other vulnerabilities in Oracle Commerce Guided Search

- [CVE-2026-71037](https://insights.sbomify.com/CVE-2026-71037/): Missing authorization in Oracle Commerce Guided Search / Oracle Commerce Experience Manager (critical 9.3)
- [CVE-2026-71036](https://insights.sbomify.com/CVE-2026-71036/): Privilege escalation in Oracle Commerce Guided Search / Oracle Commerce Experience Manager (critical 9.1)
- [CVE-2016-5482](https://insights.sbomify.com/CVE-2016-5482/): Other in n/a (high 8.2)
- [CVE-2026-71038](https://insights.sbomify.com/CVE-2026-71038/): Auth bypass in Oracle Commerce Guided Search / Oracle Commerce Experience Manager (high 7.5)
- [CVE-2022-21466](https://insights.sbomify.com/CVE-2022-21466/): Information disclosure in Commerce Guided Search / Oracle Commerce Experience Manager (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-22947 and fix it if it is affected.

What it is: CVE-2022-22947 is a critical code injection vulnerability in Oracle Commerce Guided Search, published on 3 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2022-22947 in the wild since at least 16 May 2022.

Affected packages and fixed versions:
- org.springframework.cloud:spring-cloud-gateway (Maven): affected all versions; fixed in 3.0.7
- org.springframework.cloud:spring-cloud-gateway (Maven): affected all versions; fixed in 3.0.7
- org.springframework.cloud:spring-cloud-gateway (Maven): affected from 3.1.0; fixed in 3.1.1
- org.springframework.cloud:spring-cloud-gateway (Maven): affected from 3.1.0; fixed in 3.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-22947/ (Markdown: https://insights.sbomify.com/CVE-2022-22947/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-22947
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-22947
- OSV: https://osv.dev/vulnerability/CVE-2022-22947

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-22947/
Summaries are generated and may contain mistakes; the official description above is the record.
