CVE-2026-59435
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. Its Config Server gives applications a central place to fetch their configuration properties, typically backed by a Git or SVN repository.
An information exposure vulnerability (CVE-2026-59435) has been identified in Spring Cloud Config Server, which allows attackers to obtain the credentials of the backend Git or SVN repository. When the configured repository URI contains a username and password in its userinfo section, those credentials are returned in clear text in the response body of every successful configuration request.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
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 High-severity vulnerability is found in the org.springframework.cloud:spring-cloud-config-server package in multiple versions of Spring Cloud Config. When the Config Server serves an environment from a Git or SVN backend, AbstractScmEnvironmentRepository passes the configured repository URI, exactly as written in the server configuration, to EnvironmentCleaner.clean. That method rewrites the name of every returned property source by prefixing it with the URI:
public Environment clean(Environment value, String workingDir, String uri) {
Environment result = new Environment(value);
for (PropertySource source : value.getPropertySources()) {
String name = source.getName().replace(workingDir, "");
name = name.replace("applicationConfig: [", "");
name = uri + "/" + name.replace("]", "");
result.add(new PropertySource(name, clean(source.getSource(), uri)));
}
return result;
}
The URI is used without removing its userinfo component. A server configured with a repository URI such as https://user:token@git.example.com/config-repo.git therefore returns property source names such as https://user:token@git.example.com/config-repo.git/application.yml to every client. The same raw URI is also written into the origin of each property value descriptor by the clean(Map, String) overload. Any client that can request configuration from the Config Server can read the repository username and password or access token from the response body and use them to access the backend repository directly. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
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.
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.
Credits
- EaEa0001 (finder)