CVE-2026-40973: Spring Boot Predictable Temp Directory Vulnerability

Summary

28/04/2026
Yes i
High
7.0

CVE-2026-40973: Spring Boot accepts predictable temp directory without ownership verification. Affects org.springframework.boot:spring-boot across 5 version ranges.

< 2.7.32 >= 3.3.0, <= 3.3.18 >= 3.4.0, <= 3.4.15 >= 3.5.0, < 3.5.14 >= 4.0.0, < 4.0.6

Fixed in 2.7.32, 3.5.14 or 4.0.6, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Spring Boot is a popular framework for building Java-based applications. It simplifies the development process by providing a range of features such as embedded servers, auto-configuration, and production-ready metrics. However, certain versions of Spring Boot are vulnerable to a security issue that allows local attackers to exploit predictable temporary directories, potentially leading to session hijacking and unauthorized code execution.

Vulnerability Detail

The vulnerability arises from Spring Boot's acceptance of a predictable temporary directory without proper ownership verification. When the configuration option 'server.servlet.session.persistent' is set to true, a local attacker on the same host can manipulate the temporary directory used by the application. This could allow the attacker to read sensitive session information, hijack authenticated user sessions, or deploy malicious code as the application's user. The affected versions include Spring Boot 4.0.0 to 4.0.5, 3.5.0 to 3.5.13, 3.4.0 to 3.4.15, 3.3.0 to 3.3.18, and 2.7.0 to 2.7.32.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.7.32 2.7.32
  • >= 3.5.0, < 3.5.14 3.5.14
  • >= 4.0.0, < 4.0.6 4.0.6

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, consider disabling session persistence by setting 'server.servlet.session.persistent' to false in your application properties. This will prevent the application from using the vulnerable temporary directory configuration.

Conclusion

In summary, CVE-2026-40973 is a significant vulnerability in certain versions of Spring Boot that allows local attackers to exploit predictable temporary directories. It is crucial to update to the latest patched versions to mitigate the risk of session hijacking and unauthorized code execution.

See every vulnerability recorded for org.springframework.boot:spring-boot →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.0, indicating a high severity level.

Affected versions include Spring Boot 4.0.0 to 4.0.5, 3.5.0 to 3.5.13, 3.4.0 to 3.4.15, 3.3.0 to 3.3.18, and 2.7.0 to 2.7.32.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If immediate updates are not possible, consider disabling session persistence as a temporary workaround.

The potential consequences include session hijacking, unauthorized access to sensitive information, and the ability to execute arbitrary code as the application's user.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.boot:spring-boot.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.7.32 2.7.32
  • >= 3.5.0, < 3.5.14 3.5.14
  • >= 4.0.0, < 4.0.6 4.0.6

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback