CVE-2025-22235: Spring Framework Spring Boot EndpointRequest.to() Creates Wrong Vulnerability

HIGH
Advisory Identifier: GHSA-rc42-6c7j-7h5r
CVSS 7.3
CWE-20 CWE-862
Published
Advisory Summary

CVE-2025-22235 is a HIGH (CVSS 7.3) spring boot endpointrequest.to() creates wrong vulnerability (CWE-20: Improper Input Validation) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring boot endpointrequest.to() creates wrong matcher if actuator endpoint is not exposed. Remediation is available by upgrading affected packages to version 3.3.11, 3.4.5.

CVE-2025-22235 at a Glance

CVE Identifier CVE-2025-22235
GHSA Identifier GHSA-rc42-6c7j-7h5r
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.3

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:L/I:L/A:L).

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 Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-22235

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.boot:spring-boot fixed: Latest secure release
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>Latest secure release</version>
</dependency>
org.springframework.boot:spring-boot fixed: Latest secure release
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>Latest secure release</version>
</dependency>
org.springframework.boot:spring-boot fixed: Latest secure release
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>Latest secure release</version>
</dependency>
org.springframework.boot:spring-boot fixed: 3.3.11
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>3.3.11</version>
</dependency>
org.springframework.boot:spring-boot fixed: 3.4.5
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>3.4.5</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.boot

How to Check if You Are Affected

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

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

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 3.3.11), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.boot 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

EndpointRequest.to() creates a matcher for null/** if the actuator endpoint, for which the EndpointRequest has been created, is disabled or not exposed. Your application may be affected by this if all the following conditions are met: * You use Spring Security * EndpointRequest.to() has been used in a Spring Security chain configuration * The endpoint which EndpointRequest references is disabled or not exposed via web * Your application handles requests to /null and this path needs protection You are not affected if any of the following is true: * You don't use Spring Security * You don't use EndpointRequest.to() * The endpoint which EndpointRequest.to() refers to is enabled and is exposed * Your application does not handle requests to /null or this path does not need protection

CVE-2025-22235 Affected Spring Framework Versions

5 component(s)
Fixed Versions:
3.3.113.4.5
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.boot:spring-boot
Maven
≤ 2.7.24.2
org.springframework.boot:spring-boot
Maven
≥ 3.1.0
≤ 3.1.15.2
org.springframework.boot:spring-boot
Maven
≥ 3.2.0
≤ 3.2.13.2
org.springframework.boot:spring-boot
Maven
≥ 3.3.0
< 3.3.11
3.3.11
org.springframework.boot:spring-boot
Maven
≥ 3.4.0
< 3.4.5
3.4.5

References

Frequently Asked Questions

What is CVE-2025-22235?
CVE-2025-22235 is a security vulnerability in Spring Framework involving Spring Boot EndpointRequest.to() creates wrong matcher if actuator endpoint is not exposed under CWE-20: Improper Input Validation.
Which Spring Framework versions are affected?
Affected versions include releases prior to 3.3.11, 3.4.5 across affected packages: org.springframework.boot:spring-boot.
What version fixes CVE-2025-22235?
Upgrading to 3.3.11, 3.4.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-boot affected?
Yes, org.springframework.boot:spring-boot is affected in releases prior to Latest secure release, 3.3.11, 3.4.5. Upgrade your dependency to Latest secure release, 3.3.11, 3.4.5 or later.
What is the CVSS score of CVE-2025-22235?
CVE-2025-22235 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-22235?
CVE-2025-22235 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2025-22235?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.boot'. 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-rc42-6c7j-7h5r",
  "modified" : "2025-05-17T00:30:25Z",
  "published" : "2025-04-28T09:31:53Z",
  "aliases" : [ "CVE-2025-22235" ],
  "summary" : "Spring Boot EndpointRequest.to() creates wrong matcher if actuator endpoint is not exposed",
  "details" : "EndpointRequest.to() creates a matcher for null/** if the actuator endpoint, for which the EndpointRequest has been created, is disabled or not exposed.\n\nYour application may be affected by this if all the following conditions are met:\n\n  *  You use Spring Security\n  *  EndpointRequest.to() has been used in a Spring Security chain configuration\n  *  The endpoint which EndpointRequest references is disabled or not exposed via web\n  *  Your application handles requests to /null and this path needs protection\n\n\nYou are not affected if any of the following is true:\n\n  *  You don't use Spring Security\n  *  You don't use EndpointRequest.to()\n  *  The endpoint which EndpointRequest.to() refers to is enabled and is exposed\n  *  Your application does not handle requests to /null or this path does not need protection",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.7.24.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "last_affected" : "3.1.15.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0"
      }, {
        "last_affected" : "3.2.13.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.3.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.3.10"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.4.4"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-22235"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-boot"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250516-0010"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2025-22235"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-28T20:59:16Z",
    "nvd_published_at" : "2025-04-28T08:15:15Z"
  }
}