CVE-2026-59364: Spring Integration DefaultFtpsSessionFactory Does Not Verify FTPS Server Certificate and Hostname by Default
When no TrustManager is explicitly configured, DefaultFtpsSessionFactory relies on the Apache Commons Net FTPSClient default trust manager, which only checks each certificate's validity dates and does not verify the certificate chain against a trust anchor. In addition, the factory does not enable hostname verification (endpoint checking) for the FTPS connection.
As a result, an attacker with an active man-in-the-middle position between the application and the FTPS server can present any non-expired self-signed certificate, transparently intercept the TLS connection, capture the FTP credentials sent during login, and read or tamper with transferred files. Any application that uses DefaultFtpsSessionFactory without explicitly configuring a secure TrustManager is affected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Explicitly configure a secure TrustManager for the FTPS connection.
Spring Integration DefaultFtpsSessionFactory TrustManager = secure TrustManager - Configuration
Enable hostname verification (endpoint checking) for the FTPS connection.
Spring Integration DefaultFtpsSessionFactory hostname verification (endpoint checking) = enabled
Event History
Frequently Asked Questions
Which deployments are affected by this issue?
Applications using Spring Integration's DefaultFtpsSessionFactory are affected when they have not explicitly configured a secure TrustManager. The default behavior does not validate the server certificate chain against a trust anchor and does not enable hostname verification.
What does an attacker need to exploit this vulnerability?
An attacker must be in an active man-in-the-middle position between the application and its FTPS server. They can use any non-expired self-signed certificate to intercept the TLS connection.
What could an attacker obtain or change through a successful attack?
The attacker can capture FTP credentials sent during login and read or tamper with transferred files. This affects confidentiality and integrity of both credentials and FTPS transfers.
What configuration change addresses the unsafe default?
Explicitly configure a secure TrustManager for DefaultFtpsSessionFactory. Ensure the FTPS connection also performs hostname verification (endpoint checking), since it is not enabled by default.