CVE-2025-41253: Spring Cloud Gateway Webflux SpEL Injection Vulnerability Allowing Exposure of Environment Variables
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Spring Cloud Gateway Server Webflux OSS 4.3.xto a version that resolves this vulnerability.Fixed in 4.3.2 - Upgrade
Upgrade
Spring Cloud Gateway Server Webflux OSS 4.2.xto a version that resolves this vulnerability.Fixed in 4.2.6 - Upgrade
Upgrade
Spring Cloud Gateway Server Webflux Commercial 4.1.xto a version that resolves this vulnerability.Fixed in 4.1.12 - Upgrade
Upgrade
Spring Cloud Gateway Server Webflux Commercial 3.1.xto a version that resolves this vulnerability.Fixed in 3.1.12 - Configuration
Remove 'gateway' from management.endpoints.web.exposure.include, or secure the actuator endpoints so they are not available unsecured to attackers.
Spring Cloud Gateway Server Webflux actuator gateway endpoint management.endpoints.web.exposure.include = Exclude gateway
Event History
Frequently Asked Questions
What is the severity of CVE-2025-41253?
CVE-2025-41253 is classified as a medium severity vulnerability due to the potential risk of exposing sensitive environment variables and system properties.
How do I fix CVE-2025-41253?
To mitigate CVE-2025-41253, upgrade to the latest patched version of Spring Cloud Gateway Server Webflux.
What versions are affected by CVE-2025-41253?
CVE-2025-41253 affects all versions of Spring Cloud Gateway Server Webflux that do not include the security patch.
What are the potential impacts of CVE-2025-41253?
The potential impacts of CVE-2025-41253 include unauthorized access to sensitive environment variables and system properties.
Is CVE-2025-41253 being actively exploited?
As of now, there are no reported active exploits specifically targeting CVE-2025-41253.