Spring Boot ApplicationTemp predictable temp directory ownership verification flaw
CVE-2026-40973 is a local attack vulnerability in Spring Boot's ApplicationTemp handling caused by use of a predictable temporary directory path together with insufficient validation of pre-existing filesystem objects. For a given application, the temporary directory name can remain predictable across restarts, and the vulnerable implementation accepted an existing path without adequately verifying that it was owned by the application's user. The provided context further indicates the code used Files.exists(path) without LinkOption.NOFOLLOW_LINKS, allowing symlinks to be followed transparently, and did not verify ownership before reuse. As a result, a local attacker on the same host can pre-create the expected directory or plant a symlink at that location before application startup or restart, causing the application to use an attacker-controlled location for temporary data. When persistent servlet sessions are enabled via server.servlet.session.persistent=true, this can expose persisted session data and, if malicious serialized data is introduced and later deserialized on restart, may lead to code execution as the application user. Affected versions are Spring Boot 4.0.0 through 4.0.5, 3.5.0 through 3.5.13, 3.4.0 through 3.4.15, 3.3.0 through 3.3.18, and 2.7.0 through 2.7.32; unsupported versions are also affected according to the vendor advisory.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
No public exploits tracked yet. Mallory keeps watching.
No public exploit code observed for this vulnerability.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A high-severity local privilege escalation / code execution vulnerability in Spring Boot's ApplicationTemp temporary directory handling caused by predictable directory names, symlink following, and missing ownership validation.
A high-severity vulnerability in Spring Boot described as acceptance of a predictable temporary directory without ownership verification.
A Spring Boot vulnerability involving acceptance of a predictable temporary directory without ownership verification.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.