HIGH

CVE-2026-59381

Spring Integration Remote File MGET Local Directory Path Traversal via Server-Controlled Remote Directory

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.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.integration » spring-integration-file
>= 5.5.0, <= 5.5.22>= 6.4.0, <= 6.4.13>= 6.5.0, <= 6.5.11>= 7.0.0, < 7.0.8>= 7.1.0, < 7.1.3
7.0.8, 7.1.3

Blast radius

1affected artifacts
54affected versions
63dependent artifacts (est.)
620dependent versions

79% of the dependent artifacts (50) still pull an affected version in their latest release.

DepthDependent versions
Direct
242
2 hops
292
3 hops
77
4 hops
9

Most used dependents

Computed from the dependency graph of build 20261125.2201 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.