CVE-2026-59381
7.1HighPublished Dec 2, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite
High
0CVSS v3.110
- Attack vector
- Network
- Complexity
- High
- Privileges
- Low
- User action
- Required
- Impact
- High impact on integrity
- Weakness
- —
What an attacker gets
A malicious FTP, SFTP, or SMB server can write files to arbitrary locations on your system. This requires an application to use the MGET command with a local-directory-expression that references the #remoteDirectory SpEL variable.
Root cause
The framework fails to properly validate the local directory path when it is derived from server-controlled listing entries, allowing directory traversal during file creation.
Affected versions
Versions not listed — check the vendor advisory.
CVSS v3.1 · CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:L
Fix & remediation
Upgrade to the patched version specified in the Spring security advisory. If you cannot patch immediately, remove any local-directory-expression configurations that utilize the #remoteDirectory SpEL variable.
AI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD description
The fix for CVE-2026-40987 validates only the file name against the local directory. For the remote file outbound gateway MGET command, the local directory itself can be derived from the server-controlled listing entry via the documented #remoteDirectory SpEL variable in a local-directory-expression . Since the directory is canonicalized before the containment check, the check passes even though the directory has already escaped the intended root, and the framework then creates the escaped directory. As a result, a malicious FTP, SFTP or SMB server can write files with attacker-controlled content to arbitrary paths outside the configured local directory. Applications are affected if they use the MGET command of an FTP, SFTP or SMB outbound gateway with a local directory expression that references #remoteDirectory (as in the reference documentation examples) and connect to a server that may be malicious or compromised.
References
Related Critical / High CVEs
More fully triaged vulnerabilities you may want to check next.
- CVE-2026-594447.5HighAuthenticated attackers can achieve remote code execution by injecting malicious serialized objects into Redis lists. This requires the application to use default Java deserialization settings and have gadget chains available on the classpath.
- CVE-2026-594167.0HighRemote attackers can inject arbitrary FTP commands by crafting malicious filenames. This requires the application to use Spring Integration FTP components with the chmod option enabled and process untrusted file paths.
- CVE-2026-594337.5HighUnauthenticated attackers can view sensitive credentials embedded in peer service URLs via the Eureka Server dashboard. This occurs if the dashboard is exposed and peer nodes are configured with embedded credentials.
- CVE-2026-594277.5HighUnauthenticated attackers can access sensitive, user-specific data that was incorrectly cached. This occurs when the gateway caches responses that should have been marked private or no-store.
- CVE-2026-594267.5HighUnauthenticated attackers can read sensitive responses intended for other users. This occurs when multiple routes share the same global cache without unique keys.
- CVE-2026-594257.5HighUnauthenticated attackers can cause a denial of service by exhausting socket and channel resources. This occurs by sending repeated requests to any route configured with the JsonToGrpc filter.