CVE-2026-59437
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Cloud Config provides server-side and client-side support for externalized configuration in a distributed system. Its Config Server gives applications a central place to manage external properties across all environments, and it commonly reads that configuration from a Git repository.
A signature forgery vulnerability (CVE-2026-59437) has been identified in the Spring Cloud Config Server, which allows attackers to impersonate the Git server with any SSH host key when property-based SSH settings are used without an explicit host key. An attacker who can intercept or redirect the connection can then serve modified configuration to the Config Server and the applications that rely on it.
Per OWASP: The Manipulator-in-the Middle attack (MITM) intercepts a communication between two systems.
This issue affects multiple versions of Spring Cloud Config.
Details
Module Info
- Product: Spring Cloud Config
- Affected packages:
org.springframework.cloud:spring-cloud-config-server - Affected versions: >=3.1.0 <=3.1.15, >=4.0.0 <=4.2.9, >=4.3.0 <=4.3.5, >=5.0.0 <=5.0.6
- GitHub repository: https://github.com/spring-cloud/spring-cloud-config
- Published packages: https://central.sonatype.com/artifact/org.springframework.cloud/spring-cloud-config-server
- Package manager: Maven
- Fixed in:
- OSS Spring Cloud Config 5.0.7
- NES for Spring Cloud Config
Vulnerability Info
This Medium-severity vulnerability is found in the org.springframework.cloud:spring-cloud-config-server package in multiple versions of Spring Cloud Config.
When a Git backend is configured with property-based SSH settings (spring.cloud.config.server.git.ignoreLocalSshSettings=true), the Config Server builds its SSH sessions through PropertyBasedSshSessionFactory. For each Git host, the factory decides whether to enforce strict host key checking:
JGitEnvironmentProperties sshProperties = sshKeysByHostname.get(hostName);
if (sshProperties.getHostKey() == null || !sshProperties.isStrictHostKeyChecking()) {
hostEntry.setValue(SshConstants.STRICT_HOST_KEY_CHECKING, SshConstants.NO);
}
else {
hostEntry.setValue(SshConstants.STRICT_HOST_KEY_CHECKING, SshConstants.YES);
}
The getHostKey() == null branch turns strict host key checking off whenever no spring.cloud.config.server.git.hostKey is set, even though spring.cloud.config.server.git.strictHostKeyChecking is true by default. With StrictHostKeyChecking=no, the SSH client accepts whatever host key the remote end presents, and a host key list supplied through spring.cloud.config.server.git.knownHostsFile is never used to reject it. An attacker in a position to intercept the connection or spoof the Git server's address can complete the SSH handshake with their own key and serve arbitrary repository content, which the Config Server then hands out as configuration to its client applications.
Mitigation
Only recent versions of Spring Cloud Config receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Until an upgrade is possible, set spring.cloud.config.server.git.hostKey, together with spring.cloud.config.server.git.hostKeyAlgorithm, for every Git repository that uses property-based SSH settings, so that the Git server's key is pinned explicitly.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring Cloud Config.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.