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

HIGH | NOVEMBER 19, 2026 | CVE-2026-59381

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 Spring Products and Versions

Spring Integration:

  • 7.1.0 - 7.1.2
  • 7.0.0 - 7.0.7
  • 6.5.0 - 6.5.11
  • 6.4.0 - 6.4.13
  • 5.5.0 - 5.5.22

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
7.1.3OSS
7.1.2.1Enterprise Support Only
7.0.8OSS
7.0.7.1Enterprise Support Only
6.5.12Enterprise Support Only
6.4.14Enterprise Support Only
5.5.23Enterprise Support Only

Users of affected versions who cannot upgrade should avoid referencing #remoteDirectory in the MGET local directory expression, or ensure the resolved local directory is validated against the intended root directory. Connecting only to trusted FTP, SFTP or SMB servers further reduces the risk.

Credit

This vulnerability was discovered and responsibly reported by h1ei1.

History

  • 2026-11-19: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

TrueSource Spring Enterprise offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all