Man In The Middle Attack Possible When Using Git and SSH With Spring Cloud Config Server

MEDIUM | NOVEMBER 19, 2026 | CVE-2026-59437

Description

When Spring Cloud Config Server uses property-based SSH settings (spring.cloud.config.server.git.ignoreLocalSshSettings=true) for a Git repository and no spring.cloud.config.server.git.hostKey is configured, it disables strict host key checking even if spring.cloud.config.server.git.strictHostKeyChecking is true, which is the default. The server then accepts any SSH server key and never consults the configured spring.cloud.config.server.git.knownHostsFile.

Applications are affected when they use the Config Server with a Git backend over SSH in property-based SSH mode without an explicit hostKey.

Affected Spring Products and Versions

Spring Cloud Config:

  • 5.0.0 - 5.0.6
  • 4.3.0 - 4.3.5
  • 4.0.0 - 4.2.9
  • 3.1.0 - 3.1.15

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
5.0.7OSS
5.0.6.1Enterprise Support Only
4.3.6Enterprise Support Only
4.2.10Enterprise Support Only
3.1.16Enterprise Support Only

Until you can upgrade, set the spring.cloud.config.server.git.hostKey property (together with spring.cloud.config.server.git.hostKeyAlgorithm) for every Git repository that uses property-based SSH settings, so that the server's key is pinned explicitly.

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