CVE-2025-41253: Spring Framework Spring Cloud Gateway Server Webflux Vulnerability

HIGH
Advisory Identifier: GHSA-fwxx-wv44-7qfg
CVSS 7.5
CWE-917
Published
Advisory Summary

CVE-2025-41253 is a HIGH (CVSS 7.5) spring cloud gateway server webflux vulnerability (CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring cloud gateway server webflux is vulnerable to expression language injection. Remediation is available by upgrading affected packages to version 4.3.2, 4.2.6.

CVE-2025-41253 at a Glance

CVE Identifier CVE-2025-41253
GHSA Identifier GHSA-fwxx-wv44-7qfg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-41253

To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework.cloud:spring-cloud-gateway-server fixed: 4.3.2
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>4.3.2</version>
</dependency>
org.springframework.cloud:spring-cloud-gateway-server fixed: 4.2.6
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>4.2.6</version>
</dependency>
org.springframework.cloud:spring-cloud-gateway-server fixed: Latest secure release
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>Latest secure release</version>
</dependency>
org.springframework.cloud:spring-cloud-gateway-server fixed: Latest secure release
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework.cloud

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-41253, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework.cloud

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.cloud command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection'), where the product constructs all or part of an expression language (el) statement in a framework such as a java server page (jsp) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended el statement before it is executed. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-41253 Affected Spring Framework Versions

4 component(s)
Fixed Versions:
4.3.24.2.6
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.3.0
< 4.3.2
4.3.2
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.2.0
< 4.2.6
4.2.6
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.0.0
≤ 4.1.9
org.springframework.cloud:spring-cloud-gateway-server
Maven
≤ 3.1.10

References

Frequently Asked Questions

What is CVE-2025-41253?
CVE-2025-41253 is a security vulnerability in Spring Framework involving Spring Cloud Gateway Server Webflux is vulnerable to Expression Language Injection under CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection').
Which Spring Framework versions are affected?
Affected versions include releases prior to 4.3.2, 4.2.6 across affected packages: org.springframework.cloud:spring-cloud-gateway-server.
What version fixes CVE-2025-41253?
Upgrading to 4.3.2, 4.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-cloud-gateway-server affected?
Yes, org.springframework.cloud:spring-cloud-gateway-server is affected in releases prior to 4.3.2, 4.2.6, Latest secure release. Upgrade your dependency to 4.3.2, 4.2.6, Latest secure release or later.
What is the CVSS score of CVE-2025-41253?
CVE-2025-41253 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-41253?
CVE-2025-41253 is classified under CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection') (The product constructs all or part of an expression language (EL) statement in a framework such as a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed.).
How can I check Maven dependencies for CVE-2025-41253?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.cloud'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fwxx-wv44-7qfg",
  "modified" : "2026-02-19T22:00:41Z",
  "published" : "2025-10-16T15:30:43Z",
  "aliases" : [ "CVE-2025-41253" ],
  "summary" : "Spring Cloud Gateway Server Webflux is vulnerable to Expression Language Injection",
  "details" : "The following versions of Spring Cloud Gateway Server Webflux may be vulnerable to the ability to expose environment variables and system properties to attackers.\n\nAn application should be considered vulnerable when all the following are true:\n\n  *  The application is using Spring Cloud Gateway Server Webflux (Spring Cloud Gateway Server WebMVC is not vulnerable).\n  *  An admin or untrusted third party using Spring Expression Language (SpEL) to access environment variables or system properties via routes.\n  *  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.\n  *  The actuator endpoints are available to attackers.\n  *  The actuator endpoints are unsecured.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "last_affected" : "4.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-41253"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-cloud/spring-cloud-gateway"
  }, {
    "type" : "WEB",
    "url" : "https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N&version=3.1"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve/2025-41253"
  }, {
    "type" : "WEB",
    "url" : "https://www.cve.org/CVERecord?id=CVE-2025-41253"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-917" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-16T21:29:31Z",
    "nvd_published_at" : "2025-10-16T15:15:33Z"
  }
}