Spring Boot
CVE-2026-40973
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain local user access
-
DeliveryMonitor application restart schedule
-
ExploitRace to create ApplicationTemp directory
-
InstallPlant malicious serialized object or wait for session writes
-
C2Trigger deserialization or read session files
-
ExecuteHijack sessions or execute code as application user
-
ImpactEscalate privileges or persist access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Secure temp file creation
|
| Exploitation Conditions | Exploitation requires the Spring Boot application to have server.servlet.session.persistent set to true in configuration (non-default setting). Attacker must have a local user account on the same host as the Spring Boot application (low-privilege access sufficient). Attack persistence across at least one application restart is required for session hijacking or gadget chain deployment. The attacker must win a race condition or exploit predictable directory naming to take control of the ApplicationTemp directory before the application claims it. High attack complexity (AC:H) indicates timing dependencies or specific system states must align, such as application restart windows, filesystem permissions allowing directory creation in the temp path, or absence of operating system-level protections preventing directory substitution attacks. The vulnerability is limited to local attack scenarios and does not enable remote exploitation without pre-existing local access through other means. |
| Impact | Real-world risk is moderate despite the 7.0 CVSS score due to multiple limiting factors. Attack vector is local (AV:L) requiring existing host access, high complexity (AC:H) suggesting exploitation requires precise timing or race condition wins, and low privileges (PR:L) meaning the attacker needs at least basic user account access on the same host. The critical dependency on server.servlet.session.persistent being set to true significantly reduces the attack surface, as this is not a default Spring Boot configuration and is typically only enabled in specific deployment scenarios requiring session persistence across restarts. No EPSS score is provided in the data, preventing statistical exploitation probability assessment. No CISA KEV listing indicates no confirmed active exploitation. No public exploit identified at time of analysis. The technical impact is severe (C:H/I:H/A:H) if conditions are met, enabling full session hijacking or code execution as the application user. Primary risk exists in multi-tenant environments, shared hosting platforms, or containerized deployments where multiple users have local access to the same host running Spring Boot applications with persistent sessions enabled. Organizations using default configurations or running Spring Boot in isolated single-tenant environments face substantially lower risk. The availability of vendor patches across all supported branches enables effective mitigation for current deployments. |
| Exploit ScenarioDerived | An attacker with a low-privilege local account on a shared application server running Spring Boot 3.5.12 with persistent sessions enabled predicts or races to create the ApplicationTemp directory before the application starts. The attacker maintains control of this directory across an application restart or maintenance window. When the Spring Boot application resumes and writes serialized session data to the attacker-controlled directory, the attacker reads session files to extract authentication tokens and JSESSIONID values, hijacking active user sessions. Alternatively, the attacker plants a malicious serialized Java object containing a gadget chain in the directory. When the application reads and deserializes this object during session restoration, the gadget chain executes arbitrary code with the privileges of the application user, potentially leading to further system compromise. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 28, 2026
Local privilege escalation and session hijacking in Spring Boot allows attackers with local access to hijack authenticated sessions or execute arbitrary code by taking control of the ApplicationTemp directory. The vulnerability affects Spring Boot versions 2.7.0 through 4.0.5 when server.servlet.session.persistent is enabled, requiring attack persistence across application restarts. VMware has released patches for all supported branches (4.0.6, 3.5.14, 3.4.16, 3.3.19, 2.7.33), though unsupported versions remain vulnerable. No active exploitation confirmed at time of analysis.
RemediationAI
Upgrade to patched Spring Boot versions immediately: 4.0.6 or later for 4.0.x branch, 3.5.14 or later for 3.5.x, 3.4.16 or later for 3.4.x, 3.3.19 or later for 3.3.x, or 2.7.33 or later for 2.7.x deployments. Download patches and review complete upgrade guidance at https://spring.io/security/cve-2026-40973. For systems that cannot immediately upgrade, disable persistent sessions by setting server.servlet.session.persistent to false in application.properties or application.yml, which eliminates the attack vector but will cause session loss across application restarts, affecting user experience in maintenance scenarios. As an additional defense layer, restrict local user access to application servers through operating system access controls, implement mandatory access control (MAC) policies like SELinux or AppArmor to confine the Spring Boot process and prevent directory manipulation by other local users, and monitor ApplicationTemp directory ownership and permissions for unexpected changes through file integrity monitoring tools. Organizations running unsupported Spring Boot versions must prioritize migration to supported branches or accept residual risk with compensating controls, as no vendor patches will be provided.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in maven
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Spring Boot's ApplicationTemp directory is used for temporary file operations and session persistence when server.servlet.session.persistent is configured. The vulnerability stems from CWE-377 (Insecure Temporary File), indicating predictable directory paths and inadequate ownership verification. A local attacker can exploit race conditions or predictable naming patterns to substitute the ApplicationTemp directory with their own controlled location. When persistent sessions are enabled, Spring Boot serializes session objects to this directory across application restarts. By controlling this directory, an attacker can inject malicious serialized objects (gadget chain attacks in Java deserialization contexts) or read existing session files containing authentication tokens, session IDs, and user state. The attack requires low privileges (PR:L) but high attack complexity (AC:H), suggesting timing dependencies or specific system conditions must align. The vulnerability spans multiple Spring Boot major versions from 2.7.x through 4.0.x, indicating a long-standing architectural issue in temporary directory handling.
Know when Spring Boot gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (vmware).
CVSS VectorVendor: vmware
DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 1,963 maven packages depend on org.springframework.boot:spring-boot (122 direct, 1,841 indirect)
Ecosystem-wide dependent count for version 4.0.0.
Executive ViewAI
Spring Boot versions 2.7.0 through 4.0.5 contain a local privilege escalation vulnerability that enables attackers with local system access to hijack authenticated user sessions or execute arbitrary code by manipulating the ApplicationTemp directory. Organizations running affected versions with persistent session storage enabled face risk of unauthorized access to sensitive application functionality and potential lateral movement within their infrastructure.
Vendor-released patch: Spring Boot 4.0.6, 3.5.14, 3.4.16, 3.3.19, or 2.7.33 (version-dependent). If immediate patching is not feasible: (1) Disable server.servlet.session.persistent if business logic permits stateless session handling; (2) Restrict local system access to application directories via OS-level file permissions and SELinux policies; (3) Implement container image immutability and read-only filesystem mounts where deployments are containerized; (4) Monitor ApplicationTemp directory access patterns for unauthorized modifications.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Related Vulnerabilities in Spring Boot Configuration Security Issues
View all 5More in Spring Boot
View allMalicious PATCH requests submitted to servers using Spring Data REST versions prior to 2.6.9 (Ingalls SR9), versions pri
spring-boot versions prior to version v2.2.11.RELEASE was vulnerable to temporary directory hijacking. Rated high severi
In Spring Boot versions 3.0.0 - 3.0.5, 2.7.0 - 2.7.10, and older unsupported versions, an application that is deployed t
Element Plug-in for vCenter Server incorporates SpringBoot Framework. Rated critical severity (CVSS 9.8), this vulnerabi
Unauthorized read access to book records in TaleLin lin-cms-spring-boot 0.2.1 and earlier is possible through the search
Improper authorization in TaleLin lin-cms-spring-boot through 0.2.1 lets unauthenticated remote attackers read book reco
Improper authorization in TaleLin lin-cms-spring-boot 0.2.1 and earlier lets remote unauthenticated attackers read book
Spring Boot's RabbitMQ auto-configuration omits TLS hostname verification when an SSL bundle is configured, enabling a m
This is an authentication bypass vulnerability in Spring Boot applications using Spring Security with Actuator endpoints
Spring Boot Actuator endpoints can be bypassed for authentication when application endpoints are configured under Health
GHSA-wwpq-f5c3-7hvx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB