CVE-2026-40977
Java vulnerability analysis and mitigation

Overview

CVE-2026-40977 is a symlink-following vulnerability in Spring Boot's ApplicationPidFileWriter component, classified as PID file write follows symlinks at predictable default path. When an application uses ApplicationPidFileWriter, a local attacker with write access to the PID file's location can corrupt an arbitrary file on the host each time the application is started. Affected versions include Spring Boot 2.7.0–2.7.32, 3.3.0–3.3.18, 3.4.0–3.4.15, 3.5.0–3.5.13, and 4.0.0–4.0.5; unsupported versions are also affected. The vulnerability was initially reported on April 23, 2026, and published to NVD and the GitHub Advisory Database on April 28, 2026. It carries a CVSS v3.1 base score of 4.7 (Medium) per the vendor and GitHub Advisory (Spring Advisory, GitHub Advisory).

Technical details

The root cause is CWE-59 (Improper Link Resolution Before File Access / 'Link Following'): ApplicationPidFileWriter writes the application's process ID to a file at a predictable default path without verifying whether that path is a symbolic link. A local attacker who can place a symlink at the PID file location before application startup can redirect the write operation to an arbitrary target file, causing its contents to be overwritten with the PID value. Exploitation requires local access and write permissions to the PID file directory, as well as high privileges on the system, making this a local privilege-abuse scenario rather than a remote attack. No public proof-of-concept code has been identified (Spring Advisory, GitHub Advisory).

Impact

Successful exploitation allows a local attacker to corrupt an arbitrary file on the host system each time the vulnerable Spring Boot application is started, resulting in high availability impact (targeted file destruction or service disruption) and limited integrity impact (file content overwritten with a PID value). Confidentiality is not directly impacted, as no data is disclosed. Depending on the targeted file, consequences could range from crashing dependent services to corrupting critical system or application configuration files, potentially enabling further privilege escalation or denial of service (GitHub Advisory, Spring Advisory).

Exploitation steps

  1. Reconnaissance: Identify a target host running a Spring Boot application configured with ApplicationPidFileWriter, and confirm the PID file's default or configured path (commonly /tmp/application.pid or a path specified in application.properties).
  2. Gain local write access: Obtain local access to the host with write permissions to the directory containing the PID file (requires high privileges or a pre-existing foothold).
  3. Place a symlink: Before the Spring Boot application starts (or after stopping it), remove the existing PID file if present and create a symbolic link at the PID file path pointing to the target file to be corrupted (e.g., ln -s /etc/cron.d/target /tmp/application.pid).
  4. Trigger application startup: Start or restart the Spring Boot application. ApplicationPidFileWriter will follow the symlink and overwrite the target file with the application's PID value.
  5. Achieve objective: The targeted file is now corrupted with the PID content, potentially disrupting services, corrupting configurations, or enabling further attack steps depending on the file targeted (Spring Advisory, GitHub Advisory).

Indicators of compromise

  • File System: Presence of a symbolic link at the application's configured PID file path (e.g., /tmp/application.pid) pointing to an unexpected target file; unexpected modification timestamps or content changes on system or application files coinciding with Spring Boot application restarts.
  • Logs: Application startup logs showing ApplicationPidFileWriter activity; OS-level audit logs (e.g., auditd) recording symlink creation (symlink or rename syscalls) at the PID file location by a non-application user prior to application startup.
  • Process: Unexpected file write events to sensitive paths (e.g., /etc/, /var/) originating from the Spring Boot JVM process at startup time, detectable via file integrity monitoring tools.

Mitigation and workarounds

Users should upgrade to the fixed Spring Boot versions: 4.0.6, 3.5.14, 3.4.16, 3.3.19, or 2.7.33, depending on their current version branch. No additional workaround steps are required beyond upgrading, per the vendor advisory. As a defense-in-depth measure, restrict write access to the PID file directory to only the application service account, and implement file integrity monitoring on PID file locations to detect unexpected symlink creation. IBM products using Spring Boot (API Connect, Instana Observability, Business Automation Manager Open Editions, Library Support for Spring) have separate advisories and should be patched per IBM guidance (Spring Advisory, IBM Advisory).

Community reactions

Spring (Broadcom/VMware) published the initial advisory on April 23, 2026, rating the vulnerability as Medium severity. HeroDevs covered the vulnerability in a blog post summarizing Spring Boot's April 2026 CVEs, noting this alongside other issues disclosed in the same release cycle (HeroDevs Blog). IBM issued multiple advisories for affected downstream products in May 2026. No significant social media controversy or researcher debate has been observed, consistent with the vulnerability's moderate severity and limited exploitability.

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-p279-2cqp-84jgCRITICAL9.6
  • Java logoJava
  • org.openidentityplatform.opendj:opendj-server-legacy
NoYesJul 24, 2026
GHSA-fp43-vj7g-pg92HIGH7.5
  • Java logoJava
  • org.omnifaces:omnifaces
NoYesJul 24, 2026
GHSA-7ppr-r889-mcf2HIGH7.5
  • Java logoJava
  • org.http4s:http4s-blaze-server_2.12
NoYesJul 24, 2026
GHSA-mhvj-jhpq-885vHIGH7.4
  • Java logoJava
  • org.http4s:http4s-blaze-server_2.13
NoYesJul 24, 2026
GHSA-46q4-43ph-c6frHIGH7.4
  • Java logoJava
  • org.http4s:blaze-http_2.12
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management