# CVE-2026-40973: Spring Boot accepts predictable temp directory without ownership verification

> Local attackers can hijack sessions or execute code by exploiting predictable temporary directories in Spring Boot when persistent sessions are enabled.

- **Severity:** High 7.0 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Apr 2026
- **Updated:** 29 Apr 2026
- **Also known as:** CLEANSTART-2026-DZ11796, CLEANSTART-2026-UX96534, CLSA-2026-1779065187, CLSA-2026-1779410900, ECHO-1e6e-2e1a-3941, GHSA-wwpq-f5c3-7hvx, MINI-26wf-8w8g-3cmp, MINI-42qw-hxqm-w5p4, MINI-77ff-frwf-9h8f, MINI-9r2w-qj5m-cp8j, MINI-gmmc-4fq8-35hv, MINI-rj3f-r93c-5vvj, MINI-vpw5-jmjp-336r, ROOT-APP-MAVEN-CVE-2026-40973

## What is CVE-2026-40973?

CVE-2026-40973 is a high-severity path traversal vulnerability in Spring Boot, published on 27 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A local attacker on the same host as the application may be able to take control of the directory used by `ApplicationTemp`. When `server.servlet.session.persistent` is set to `true` and the attack persists across application restarts, this may allow the attacker to read session information and hijack authenticated users or deploy a gadget chain and execute code as the application's user.

Affected: Spring Boot 4.0.0–4.0.5 (fix 4.0.6), 3.5.0–3.5.13 (fix 3.5.14), 3.4.0–3.4.15 (fix 3.4.16), 3.3.0–3.3.18 (fix 3.3.19), 2.7.0–2.7.32 (fix 2.7.33); predictable temp directory / `ApplicationTemp` ownership verification. Versions that are no longer supported are also affected per vendor advisory.

Weakness: CWE-377 (DEPRECATED: Insecure Temporary File)

## Which versions are affected by CVE-2026-40973?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.boot:spring-boot` | Maven | All versions to 2.7.32 | None |
| `org.springframework.boot:spring-boot` | Maven | All versions to 2.7.32 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.3.0 to 3.3.18 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.3.0 to 3.3.18 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.4.0 to 3.4.15 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.4.0 to 3.4.15 | None |
| `org.springframework.boot:spring-boot` | Maven | From 3.5.0 | 3.5.14 |
| `org.springframework.boot:spring-boot` | Maven | From 3.5.0 | 3.5.14 |
| `org.springframework.boot:spring-boot` | Maven | From 4.0.0 | 4.0.6 |
| `org.springframework.boot:spring-boot` | Maven | From 4.0.0 | 4.0.6 |

Products: Vmware Spring Boot.

## How do I fix CVE-2026-40973?

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

## Is CVE-2026-40973 being exploited?

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

## Other vulnerabilities in Spring Boot

- [CVE-2023-20873](https://insights.sbomify.com/CVE-2023-20873/): Spring Boot Security Bypass with Wildcard Pattern Matching on Cloud Foundry (critical 9.8)
- [CVE-2026-40976](https://insights.sbomify.com/CVE-2026-40976/): Spring Boot's default security filter chain has no authorization rule with Actuator but without Health (critical 9.1)
- [CVE-2026-22731](https://insights.sbomify.com/CVE-2026-22731/): Authentication Bypass under Actuator Health groups paths (high 8.2)
- [CVE-2026-22733](https://insights.sbomify.com/CVE-2026-22733/): Authentication Bypass under Actuator CloudFoundry endpoints (high 8.2)
- [CVE-2022-27772](https://insights.sbomify.com/CVE-2022-27772/): Temporary Directory Hijacking to Local Privilege Escalation Vulnerability in org.springframework.boot:spring-boot (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40973 and fix it if it is affected.

What it is: CVE-2026-40973 is a high-severity path traversal vulnerability in Spring Boot, published on 27 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40973 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.32; no fix listed
- org.springframework.boot:spring-boot (Maven): affected all versions up to 2.7.32; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.3.0 up to 3.3.18; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.3.0 up to 3.3.18; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.4.0 up to 3.4.15; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.4.0 up to 3.4.15; no fix listed
- org.springframework.boot:spring-boot (Maven): affected from 3.5.0; fixed in 3.5.14
- org.springframework.boot:spring-boot (Maven): affected from 3.5.0; fixed in 3.5.14
- org.springframework.boot:spring-boot (Maven): affected from 4.0.0; fixed in 4.0.6
- org.springframework.boot:spring-boot (Maven): affected from 4.0.0; fixed in 4.0.6

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

## Sources

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

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