# CVE-2025-41253: Spring Cloud Gateway Webflux SpEL Injection Vulnerability Allowing Exposure of Environment Variables

> Attackers can expose environment variables and system properties via SpEL injection in Spring Cloud Gateway Webflux if actuator endpoints are exposed and unsecured.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Oct 2025
- **Updated:** 16 Oct 2025
- **Also known as:** GHSA-fwxx-wv44-7qfg, ROOT-APP-MAVEN-CVE-2025-41253

## What is CVE-2025-41253?

CVE-2025-41253 is a high-severity code injection vulnerability in VMware Spring Cloud Gateway Server Webflux, published on 16 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The following versions of Spring Cloud Gateway Server Webflux may be vulnerable to the ability to expose environment variables and system properties to attackers.

An application should be considered vulnerable when all the following are true:

  *  The application is using Spring Cloud Gateway Server Webflux (Spring Cloud Gateway Server WebMVC is not vulnerable).
  *  An admin or untrusted third party using Spring Expression Language (SpEL) to access environment variables or system properties via routes.
  *  An untrusted third party could create a route that uses SpEL to access environment variables or system properties if:  *  The Spring Cloud Gateway Server Webflux actuator web endpoint is enabled via management.endpoints.web.exposure.include=gateway and management.endpoint.gateway.enabled=trueor management.endpoint.gateway.access=unrestricte.
  *  The actuator endpoints are available to attackers.
  *  The actuator endpoints are unsecured.

Weakness: CWE-917 (Improper Neutralization of Special Elements used in an Expression Language Statement)

## Which versions are affected by CVE-2025-41253?

8 open source packages ship an affected version, including org.springframework.cloud:spring-cloud-gateway-server.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | All versions to 3.1.10 | None |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | All versions to 3.1.10 | None |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.0.0 to 4.1.9 | None |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.0.0 to 4.1.9 | None |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.2.0 | 4.2.6 |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.2.0 | 4.2.6 |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.3.0 | 4.3.2 |
| `org.springframework.cloud:spring-cloud-gateway-server` | Maven | From 4.3.0 | 4.3.2 |

## How do I fix CVE-2025-41253?

Upgrade org.springframework.cloud:spring-cloud-gateway-server to a fixed version for your release line: 4.2.6 or 4.3.2.

## Is CVE-2025-41253 being exploited?

There is no known exploitation of CVE-2025-41253 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-41253 and fix it if it is affected.

What it is: CVE-2025-41253 is a high-severity code injection vulnerability in VMware Spring Cloud Gateway Server Webflux, published on 16 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-41253 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected all versions up to 3.1.10; no fix listed
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected all versions up to 3.1.10; no fix listed
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.0.0 up to 4.1.9; no fix listed
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.0.0 up to 4.1.9; no fix listed
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.2.0; fixed in 4.2.6
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.2.0; fixed in 4.2.6
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.3.0; fixed in 4.3.2
- org.springframework.cloud:spring-cloud-gateway-server (Maven): affected from 4.3.0; fixed in 4.3.2

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-2025-41253/ (Markdown: https://insights.sbomify.com/CVE-2025-41253/index.md)
```

## Sources

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

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