Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Spring Boot ApplicationTemp predictable temp directory ownership verification flaw

IdentifiersCVE-2026-40973CWE-377· Insecure Temporary File

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.

Share:
For your environment

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.

ANALYST BRIEF

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.

Successful exploitation allows a local attacker to take control of the temporary directory used by the target Spring Boot application. If persistent servlet sessions are enabled, the attacker may read stored session information and hijack authenticated users. If the attacker can place malicious gadget-bearing serialized data into the persisted session store and have it processed after an application restart, the vulnerability can also result in arbitrary code execution as the application's operating-system user. The issue therefore can affect confidentiality through session disclosure, integrity through tampering with persisted state, and availability if malicious data causes application instability or compromise.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by disabling persistent servlet sessions where feasible by setting server.servlet.session.persistent=false, preventing untrusted users from obtaining local access on the same host, and restricting write access to shared temporary-directory locations. Multi-tenant and shared-filesystem deployments should be treated as higher risk. Operationally, avoid running vulnerable applications on hosts where other tenants or lower-privileged users can pre-create or manipulate filesystem paths used for application temporary storage.

Remediation

Patch, then assume compromise.

Upgrade Spring Boot to a fixed release. The content identifies the fixed versions as 4.0.6, 3.5.14, 3.4.16, 3.3.19, and 2.7.33. For organizations on branches where fixes are only available through enterprise support, migrate to a supported fixed open-source branch if those enterprise updates are not available. The vendor patch adds symlink-safe existence checks using LinkOption.NOFOLLOW_LINKS, verifies ownership of existing directories against the application user, and on POSIX filesystems validates that the entry is a directory with expected owner-only permissions.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

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.

VendorProductType
BroadcomSpring Bootapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity2

Community discussion across Reddit, Mastodon, and other social sources.