CVE-2026-59362
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Integration is a Spring project that extends the Spring programming model to support Enterprise Integration Patterns, providing lightweight messaging and channel adapters for external systems such as SFTP, FTP, JMS and HTTP.
An authorization bypass vulnerability (CVE-2026-59362) has been identified in the SFTP module of Spring Integration, which allows attackers holding a compromised SFTP server private key to keep impersonating that server after an administrator has marked its key as @revoked in the known_hosts resource. An attacker who can intercept the application's outbound SFTP connection can then read or alter the files it transfers.
Per OWASP: The Manipulator-in-the Middle attack (MITM) intercepts a communication between two systems.
This issue affects multiple versions of Spring Integration.
Details
Module Info
- Product: Spring Integration
- Affected packages:
org.springframework.integration:spring-integration-sftp - Affected versions: >=6.4.0 <=6.4.13, >=6.5.0 <=6.5.11, >=7.0.0 <=7.0.7, >=7.1.0 <=7.1.2
- GitHub repository: https://github.com/spring-projects/spring-integration
- Published packages: https://central.sonatype.com/artifact/org.springframework.integration/spring-integration-sftp
- Package manager: Maven
- Fixed in:
- OSS Spring Integration 7.0.8, 7.1.3
- NES for Spring Integration
Vulnerability Info
This Medium-severity vulnerability is found in the spring-integration-sftp package in multiple versions of Spring Integration. Applications that configure SFTP host key checking with setKnownHostsResource() verify server keys through ResourceKnownHostsServerKeyVerifier. Its verifyServerKey method collects every known_hosts entry that matches the remote host, keeps those whose key type and key equal the presented server key, and then accepts the key if any one of them is not marked as revoked:
String serverKeyType = KeyUtils.getKeyType(serverKey);
return matches.stream()
.filter(match -> serverKeyType.equals(match.getHostEntry().getKeyEntry().getKeyType()))
.filter(match -> KeyUtils.compareKeys(match.getServerKey(), serverKey))
.anyMatch(match -> !"revoked".equals(match.getHostEntry().getMarker()));Under OpenSSH semantics, a @revoked marker is an explicit deny that must take precedence over every other matching entry. Because the check uses anyMatch on non-revoked entries, a single leftover line for the same host and key cancels the @revoked line that an administrator added after the key was compromised:
sftp.example.com ssh-rsa AAAAB3NzaC1yc2E...
@revoked sftp.example.com ssh-rsa AAAAB3NzaC1yc2E...With a known_hosts resource like this, the verifier still returns true for the compromised key. An attacker who holds the stolen private key and can intercept the application's outbound SFTP connection completes the SSH handshake as the legitimate server, and the client then authenticates to it and exchanges files with it. Exploitation requires that the known_hosts resource contain both the @revoked entry and a residual non-revoked entry for the same key.
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.