CVE-2026-59381

7.1High

Published Dec 2, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

7.1CVSS

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

Source: nvd.nist.gov/vuln/detail/CVE-2026-59381

More fully triaged vulnerabilities you may want to check next.