CVE-2026-59416

Command Injection
Affects
Spring Integration
in
Spring
No items found.
Versions
<=5.5.22, >=6.4.0 <=6.4.13, >=6.5.0 <=6.5.11, >=7.0.0 <=7.0.7, >=7.1.0 <=7.1.2

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Spring Integration extends the Spring programming model to support the well-known Enterprise Integration Patterns, enabling lightweight messaging within Spring-based applications and integration with external systems, such as FTP servers, through declarative adapters.

A command injection vulnerability (CVE-2026-59416) has been identified in the FTP outbound channel adapter and gateway of Spring Integration, which allows attackers who can influence a remote file name or directory to inject additional FTP commands on the control connection. Depending on the FTP account's permissions, the injected commands can delete or rename files, change permissions, or run other operations the server supports.

Per OWASP: A CRLF Injection attack occurs when a user manages to submit a CRLF into an application.

This issue affects multiple versions of Spring Integration.

Details

Module Info

Vulnerability Info

This High-severity vulnerability is found in the org.springframework.integration:spring-integration-ftp package in multiple versions of Spring Integration. When the chmod option is set, FtpMessageHandler (the FTP outbound channel adapter) and FtpOutboundGateway change the permissions of an uploaded file by sending a textual SITE chmod command. The command is built by concatenating the remote path onto the command text, with no check on the characters the path contains:

@Override
protected void doChmod(RemoteFileTemplate<FTPFile> remoteFileTemplate, final String path, final int chmod) {
	remoteFileTemplate.executeWithClient((ClientCallbackWithoutResult<FTPClient>) client -> {
		String chModCommand = "chmod " + Integer.toOctalString(chmod) + " " + path;
		try {
			client.sendSiteCommand(chModCommand);
		}
		// ...
	});
}

The remote path is commonly derived from the message: the default DefaultFileNameGenerator takes the file name from the FileHeaders.FILENAME header, and the remote directory can come from an expression evaluated against the message. FTP commands on the control connection are terminated by CR LF, so a file name such as good.txt\r\nDELE victim.txt makes the server receive the SITE chmod command followed by a second, attacker-chosen command, which runs with the privileges of the configured FTP account. The same unvalidated paths also reach the commands that Apache Commons Net builds for the FtpSession operations (such as STOR, RNFR and DELE) and the working-directory change performed by FtpOutboundGateway. An application is exposed when it uses the FTP outbound channel adapter or gateway with chmod set and an untrusted message sender can control the remote file name or remote directory.

Mitigation

Only recent versions of Spring Integration receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.

Users of the affected components should apply one of the following mitigations:

  • Upgrade to a currently supported version of Spring Integration.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2026-59416
PROJECT Affected
Spring Integration
Versions Affected
<=5.5.22, >=6.4.0 <=6.4.13, >=6.5.0 <=6.5.11, >=7.0.0 <=7.0.7, >=7.1.0 <=7.1.2
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Command Injection
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.