# CVE-2025-22235: Spring Boot EndpointRequest.to() creates wrong matcher if actuator endpoint is not exposed

> Attackers can bypass security controls on the /null path if Spring Security uses EndpointRequest.to() for disabled actuator endpoints.

- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Apr 2025
- **Updated:** 16 May 2025
- **Also known as:** CLEANSTART-2026-CC58014, CLSA-2025-1748390600, CLSA-2025-1754006610, ECHO-668f-c580-6f98, GHSA-rc42-6c7j-7h5r, MINI-594c-6x6w-6hgh, MINI-96j7-fg2g-g4qc, ROOT-APP-MAVEN-CVE-2025-22235, UBUNTU-CVE-2025-22235

## What is CVE-2025-22235?

CVE-2025-22235 is a high-severity missing authorization vulnerability in Spring Boot, published on 28 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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

Weakness: CWE-20 (Improper Input Validation)

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

10 open source packages ship an affected version, including org.springframework.boot:spring-boot.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.boot:spring-boot` | Maven | All versions to 2.7.24.2 | None |
| `org.springframework.boot:spring-boot` | Maven | All versions to 2.7.24.2 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.1.0 to 3.1.15.2 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.1.0 to 3.1.15.2 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.2.0 to 3.2.13.2 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.2.0 to 3.2.13.2 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.3.0 | 3.3.11 |
| `org.springframework.boot:spring-boot` | Maven | From 3.3.0 | 3.3.11 |
| `org.springframework.boot:spring-boot` | Maven | From 3.4.0 | 3.4.5 |
| `org.springframework.boot:spring-boot` | Maven | From 3.4.0 | 3.4.5 |

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

Upgrade org.springframework.boot:spring-boot to a fixed version for your release line: 3.3.11 or 3.4.5.

## Is CVE-2025-22235 being exploited?

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

Public exploit code:

- https://github.com/idealzh/cve-2025-22235-demo (github_poc): https://github.com/idealzh/cve-2025-22235-demo

## Fix prompt for AI coding agents

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

What it is: CVE-2025-22235 is a high-severity missing authorization vulnerability in Spring Boot, published on 28 Apr 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-22235 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.boot:spring-boot (Maven): affected all versions up to 2.7.24.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected all versions up to 2.7.24.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.1.0 up to 3.1.15.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.1.0 up to 3.1.15.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.2.0 up to 3.2.13.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.2.0 up to 3.2.13.2; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.3.0; fixed in 3.3.11
- org.springframework.boot:spring-boot (Maven): affected from 3.3.0; fixed in 3.3.11
- org.springframework.boot:spring-boot (Maven): affected from 3.4.0; fixed in 3.4.5
- org.springframework.boot:spring-boot (Maven): affected from 3.4.0; fixed in 3.4.5

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

## Sources

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

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