CVE-2025-41235: Spring Framework Spring Cloud Gateway Server Forwards Vulnerability

HIGH
Advisory Identifier: GHSA-6j2q-c73v-97c5
CVSS 8.6
CWE-444
Published
Advisory Summary

CVE-2025-41235 is a HIGH (CVSS 8.6) spring cloud gateway server forwards vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring cloud gateway server forwards headers from untrusted proxies. Remediation is available by upgrading affected packages to version 4.2.3, 4.1.8, 3.1.10.

CVE-2025-41235 at a Glance

CVE Identifier CVE-2025-41235
GHSA Identifier GHSA-6j2q-c73v-97c5
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.6

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:C/C:N/I:H/A:N).

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

How to Fix CVE-2025-41235

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.2.3
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>4.2.3</version>
</dependency>
org.springframework.cloud:spring-cloud-gateway-server fixed: 4.1.8
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>4.1.8</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: 3.1.10
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server</artifactId>
    <version>3.1.10</version>
</dependency>
org.springframework.cloud:spring-cloud-gateway-server-mvc fixed: 4.2.3
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gateway-server-mvc</artifactId>
    <version>4.2.3</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-41235, 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.2.3), 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-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. 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

Spring Cloud Gateway Server forwards the X-Forwarded-For and Forwarded headers from untrusted proxies.

CVE-2025-41235 Affected Spring Framework Versions

5 component(s)
Fixed Versions:
4.2.34.1.83.1.10
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.2.0
< 4.2.3
4.2.3
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.1.0
< 4.1.8
4.1.8
org.springframework.cloud:spring-cloud-gateway-server
Maven
≥ 4.0.0
≤ 4.0.9
org.springframework.cloud:spring-cloud-gateway-server
Maven
< 3.1.10
3.1.10
org.springframework.cloud:spring-cloud-gateway-server-mvc
Maven
≥ 4.1.7
< 4.2.3
4.2.3

References

Frequently Asked Questions

What is CVE-2025-41235?
CVE-2025-41235 is a security vulnerability in Spring Framework involving Spring Cloud Gateway Server Forwards Headers from Untrusted Proxies under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Spring Framework versions are affected?
Affected versions include releases prior to 4.2.3, 4.1.8, 3.1.10 across affected packages: org.springframework.cloud:spring-cloud-gateway-server, org.springframework.cloud:spring-cloud-gateway-server-mvc.
What version fixes CVE-2025-41235?
Upgrading to 4.2.3, 4.1.8, 3.1.10 (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.2.3, 4.1.8, Latest secure release, 3.1.10. Upgrade your dependency to 4.2.3, 4.1.8, Latest secure release, 3.1.10 or later.
Is spring-cloud-gateway-server-mvc affected?
Yes, org.springframework.cloud:spring-cloud-gateway-server-mvc is affected in releases prior to 4.2.3. Upgrade your dependency to 4.2.3 or later.
What is the CVSS score of CVE-2025-41235?
CVE-2025-41235 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2025-41235?
CVE-2025-41235 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check Maven dependencies for CVE-2025-41235?
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-6j2q-c73v-97c5",
  "modified" : "2025-07-28T20:34:06Z",
  "published" : "2025-05-30T06:30:25Z",
  "aliases" : [ "CVE-2025-41235" ],
  "summary" : "Spring Cloud Gateway Server Forwards Headers from Untrusted Proxies",
  "details" : "Spring Cloud Gateway Server forwards the X-Forwarded-For and Forwarded headers from untrusted proxies.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "last_affected" : "4.0.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-gateway-server-mvc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.7"
      }, {
        "fixed" : "4.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-41235"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-cloud/spring-cloud-gateway"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2025-41235"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-30T15:25:10Z",
    "nvd_published_at" : "2025-05-30T06:15:26Z"
  }
}