CVE-2026-40977 Overview
A symlink attack vulnerability has been identified in VMware Spring Boot's ApplicationPidFileWriter component. When an application is configured to use ApplicationPidFileWriter, a local attacker with write access to the PID file's location can exploit improper symlink handling to corrupt one file on the host each time the application is started.
This vulnerability (CWE-59: Improper Link Resolution Before File Access) allows attackers to leverage symbolic links to redirect file write operations, potentially corrupting critical system or application files during the application startup process.
Critical Impact
Local attackers can repeatedly corrupt arbitrary files on the host system by exploiting the PID file write mechanism, potentially leading to denial of service or compromising system integrity.
Affected Products
- VMware Spring Boot 4.0.0–4.0.5 (fix available in 4.0.6)
- VMware Spring Boot 3.5.0–3.5.13 (fix available in 3.5.14)
- VMware Spring Boot 3.4.0–3.4.15 (fix available in 3.4.16)
- VMware Spring Boot 3.3.0–3.3.18 (fix available in 3.3.19)
- VMware Spring Boot 2.7.0–2.7.32 (fix available in 2.7.33)
Discovery Timeline
- 2026-04-28 - CVE CVE-2026-40977 published to NVD
- 2026-04-30 - Last updated in NVD database
Technical Details for CVE-2026-40977
Vulnerability Analysis
The vulnerability exists in the ApplicationPidFileWriter component of Spring Boot, which is responsible for writing the application's process ID (PID) to a file during startup. This feature is commonly used for process management, allowing external tools to monitor or control the running application.
The core issue stems from improper handling of symbolic links (symlinks) when the PID file is written. When an attacker with write access to the directory containing the PID file creates a symlink pointing to a target file, the Spring Boot application follows the symlink and writes the PID content to the target file instead, effectively corrupting it.
This attack can be performed repeatedly—each time the application restarts, the attacker can corrupt a different file by updating the symlink target. The impact ranges from application crashes to potential system-wide instability depending on which files are targeted.
Root Cause
The root cause is a classic CWE-59 (Improper Link Resolution Before File Access) vulnerability. The ApplicationPidFileWriter component does not properly validate whether the destination path is a symbolic link before performing write operations. This allows the file write to be redirected to an arbitrary location within the attacker's reachable file system scope.
The absence of symlink detection and safe file creation practices (such as using O_NOFOLLOW flags or explicitly checking for symlinks before writing) enables this attack vector.
Attack Vector
The attack requires local access to the system with write permissions to the directory where the PID file is created. The attack sequence proceeds as follows:
- The attacker identifies the location where the Spring Boot application writes its PID file
- The attacker creates a symbolic link at the PID file location pointing to a target file they wish to corrupt
- When the application starts, ApplicationPidFileWriter follows the symlink and writes PID data to the target file
- The target file is corrupted with the PID content
- The attacker can repeat this process with different target files on each application restart
The attack leverages the local access vector with high privileges required, but once positioned, the attacker can systematically corrupt files with high impact on confidentiality, integrity, and availability of the system.
Detection Methods for CVE-2026-40977
Indicators of Compromise
- Unexpected symbolic links appearing in directories where Spring Boot applications write PID files
- Unexplained corruption of configuration files, logs, or other system files coinciding with application restarts
- File modification timestamps on critical files matching Spring Boot application startup times
- Presence of numeric content (PID values) in files that should contain different data
Detection Strategies
- Monitor PID file directories for symlink creation using file integrity monitoring tools
- Implement auditd rules to track symlink creation in application directories: auditctl -w /path/to/pid/directory -p wa -k springboot_pid_monitor
- Use SentinelOne's behavioral detection to identify suspicious symlink manipulation patterns
- Review application logs for unusual file access patterns during startup sequences
Monitoring Recommendations
- Enable file system auditing on directories containing PID files for Spring Boot applications
- Configure alerts for symlink creation events in monitored directories
- Implement regular integrity checks on critical system and application files
- Use SentinelOne Singularity platform to monitor for TOCTOU (Time-of-Check Time-of-Use) attack patterns associated with symlink exploitation
How to Mitigate CVE-2026-40977
Immediate Actions Required
- Upgrade affected Spring Boot applications to the patched versions: 4.0.6, 3.5.14, 3.4.16, 3.3.19, or 2.7.33
- Restrict write permissions on directories where PID files are written to only the application user
- Audit existing PID file locations for the presence of symbolic links
- Consider disabling ApplicationPidFileWriter if it is not required for your deployment
Patch Information
VMware has released security patches addressing this vulnerability across all supported Spring Boot versions. The fixed versions implement proper symlink detection and safe file handling practices in the ApplicationPidFileWriter component.
| Branch | Vulnerable Versions | Fixed Version |
|---|---|---|
| 4.0.x | 4.0.0–4.0.5 | 4.0.6 |
| 3.5.x | 3.5.0–3.5.13 | 3.5.14 |
| 3.4.x | 3.4.0–3.4.15 | 3.4.16 |
| 3.3.x | 3.3.0–3.3.18 | 3.3.19 |
| 2.7.x | 2.7.0–2.7.32 | 2.7.33 |
For complete details, refer to the Spring Security Advisory for CVE-2026-40977.
Workarounds
- Remove or disable ApplicationPidFileWriter from application configuration if PID file functionality is not required
- Configure the PID file to be written to a directory with restricted write access (e.g., only accessible by root or the application service account)
- Implement a dedicated directory for PID files with appropriate mount options (e.g., nosuid, noexec)
- Use containerized deployments where file system access is isolated and controlled
# Configuration example - Restrict PID file directory permissions
# Create a dedicated directory for PID files with restricted access
mkdir -p /var/run/springboot
chown springboot-user:springboot-group /var/run/springboot
chmod 700 /var/run/springboot
# Optionally, mount with restrictive options
# mount -o nosuid,noexec,nodev -t tmpfs tmpfs /var/run/springboot
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


