Automated Threat Modeling

Overview of CVE-2026-59435: Spring Cloud Config Server Leaks Repository Credentials in Config Responses, with Patch Analysis

A brief summary of CVE-2026-59435, a high-severity issue in which Spring Cloud Config Server returned Git or SVN repository credentials embedded in the backend URI inside every successful configuration response. Includes a short review of the fix in Spring Cloud Config 5.0.7 and the affected version ranges.

CVE Analysis

9 min read

Gaurav Sarraf
Gaurav Sarraf

2026-12-02

Overview of CVE-2026-59435: Spring Cloud Config Server Leaks Repository Credentials in Config Responses, with Patch Analysis

Introduction

Spring Cloud Config Server, the component many Spring-based microservice estates rely on to hand out centralized configuration, was returning the credentials for its own backing Git or SVN repository to every client that successfully requested configuration. When an operator embedded a username and password or access token in the repository URI, those secrets appeared in clear text in the metadata of each response. Any configuration client could end up holding direct access to the configuration backend.

The issue is tracked as CVE-2026-59435. The VMware CNA scored it CVSS 3.1 7.5 (High), and NVD has not supplied a separate assessment. Spring published its advisory on November 19, 2026, and the NVD record followed on December 2, 2026. Spring Cloud Config provides server and client support for externalized configuration in distributed systems, so the Config Server sits on a trust boundary. Clients are meant to receive application properties, not the secret the server uses to read its repository.

Technical information

Root cause: the repository URI becomes response metadata

The vulnerable behavior concerns the name of each returned property source, not the configuration values themselves. After the Git or SVN backend checks out a repository, EnvironmentCleaner.clean() renames each property source. It strips the local working directory path and prefixes the repository URI. Before the fix, it used the raw configured URI. If that URI looked like https://user:[email protected]/repo.git, the userinfo went straight into the name field of every property source in the response.

HeroDevs describes the upstream path: AbstractScmEnvironmentRepository passes the configured repository URI, unchanged, into EnvironmentCleaner.clean, where it is used without removing its userinfo component. The raw URI was also passed into the nested clean(source, uri) overload that rewrites each property's origin, so credentials leaked into a second metadata location beyond the property source name that the vendor description emphasizes.

The relevant code in 5.0.6, reconstructed from the published 5.0.6 to 5.0.7 diff, looked like this:

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))); }

Both the property source name and the argument used for origin rewriting are built from uri, the raw configured value.

Attack flow

According to the vendor advisory and the HeroDevs analysis, the attack needs no crafted payload. The sequence is:

  1. An affected Config Server is configured with a Git or SVN backend whose URI contains credentials in the userinfo section.
  2. A client issues an ordinary configuration request and receives a successful response.
  3. The client reads the property source name fields (and property origins) and extracts the repository username and password or token.
  4. The client uses those credentials to access the backend repository directly, bypassing the Config Server.

Access control nuance

The CNA vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N: network reachable, low complexity, no privileges, no user interaction, high confidentiality impact, no integrity or availability impact. In practice, exposure depends on who can obtain a successful response. Spring's security documentation supports HTTP Basic and OAuth2 JWT protection for Config Server, and the issue is not an authentication bypass, so it would be inaccurate to describe every affected deployment as anonymously readable. The same documentation notes that, by default, any authenticated user can request configuration for any application. In authenticated deployments, that widens the set of principals who can read the leaked credentials.

Impact boundaries

Spring's advisory links CWE 522 (Insufficiently Protected Credentials) and CWE 200 (Exposure of Sensitive Information to an Unauthorized Actor). The sources support credential disclosure and subsequent repository access. They do not establish that the exposed account can write to the repository, execute code, or compromise downstream applications. Those outcomes depend on the privileges of the leaked credential and are not demonstrated.

Exploitation status

The reviewed Spring advisory, NVD record and Feedly entry do not report active exploitation, a named threat actor, or a public proof of concept. Feedly showed no EPSS score at the time of review. A CIRCL Vulnerability Lookup entry records one sighting dated November 20, 2026, but the same page notes that its followed sources had not yet imported a record, so the sighting should not be read as an observed compromise. Spring credits EaEa0001 with responsibly reporting the issue.

Patch information

Where the fix lives

Spring fixed this in Spring Cloud Config 5.0.7, the open-source release, which also patches CVE-2026-59436 and CVE-2026-59437 and ships in the Spring Cloud 2025.1.5 (Oakwood) release train. Backports exist as 5.0.6.1, 4.3.6, 4.2.10 and 3.1.16, which the advisory marks Enterprise Support Only.

The change is commit a993c3a, authored by Ryan Baxter, with the message "Clean PropertySource and origin names" and a reference to CVE-2026-59435. It touches 13 files with 412 additions and 21 deletions, most of them tests.

The core change

After the fix, EnvironmentCleaner.clean() masks the URI once and uses the masked form for both the name and the origin rewriting:

public Environment clean(Environment value, String workingDir, String uri) { Environment result = new Environment(value); String maskedUri = maskUserInfo(uri); for (PropertySource source : value.getPropertySources()) { String name = source.getName().replace(workingDir, ""); name = name.replace("applicationConfig: [", ""); name = maskedUri + "/" + name.replace("]", ""); result.add(new PropertySource(name, clean(source.getSource(), maskedUri))); }

The new tests assert exact output. A repository configured with user ryan and password secret on example.com now yields property source names and origins in which the userinfo appears as ***:***, with the host, repository path and file name preserved.

The masking helper: ScmUriUtils.maskUserInfo()

The new utility class lives in org.springframework.cloud.config.server.support. Masking credentials in a URI involves several edge cases, and the helper handles each:

  • scp-style SSH remotes such as [email protected]:org/repo.git are not valid URIs, so a regex handles them separately. The result is ***@github.com:org/repo.git.
  • Hierarchical URIs (https://, ssh://, and so on) are matched by a scheme-plus-authority regex, and Spring's UriComponentsBuilder rewrites the userinfo. The code deliberately calls build().toUriString() rather than builder.toUriString() so that placeholders such as {application} and existing percent encoding are not encoded a second time.
  • An unencoded @ in the password (for example https://ryan:p@[email protected]/...) confuses a normal URI parser, so a final regex pass ensures nothing is left in front of the host.
  • Unparseable URIs (for example a non-numeric port) cause UriComponentsBuilder to throw. The helper catches the exception and falls back to regex masking.
  • False positives are avoided: local paths and file: URIs containing @ (such as /home/ryan@corp/repo), and an @ inside a URI path segment, are left alone.
  • Mask, do not strip: user becomes *** and user:pass becomes ***:***. Per the Javadoc, a URI configured with credentials can "still be told apart from one configured without them." The function is idempotent.
public static String maskUserInfo(String uri) { if (!StringUtils.hasText(uri) || uri.indexOf('@') < 0) { return uri; } Matcher scpLike = SCP_LIKE_URI.matcher(uri); if (scpLike.matches()) { return MASK + "@" + scpLike.group(1); } ... }

A safe accessor for SCM code

AbstractScmAccessor, the shared base class for the JGit and SVNKit repositories, gains a getMaskedUri() method. The existing getUri() now carries a Javadoc warning that it may contain credentials and must never be logged or placed in an exception message. getUri() still returns the raw URI because JGit and SVNKit need the real credentials to clone and fetch. Masking changes only what is shown to users and written to logs, not how the server authenticates.

Hardening beyond the reported bug

The patch also switches other places where the raw URI could escape to the masked form:

  • JGitEnvironmentRepository: the NoSuchRepositoryException messages ("No such repository...", "Cannot clone or checkout repository...") and the "working tree is not clean" log line. A test comment explains that the exception message "ends up in the /actuator/health details", a second leak path separate from the configuration response itself.
  • SvnKitEnvironmentRepository: checkout and update debug and error messages.
  • MultipleJGitEnvironmentRepository: debug logs when a pattern-matched repository fails to load.
  • GitCredentialsProviderFactory: every debug line recording which credentials provider was built for a URI.
  • HttpClientConfigurableHttpConnectionFactory: warnings and errors printing the URL and matched repository URL templates.
  • AbstractScmAccessor.validateNoTemplateInAuthority(): the IllegalArgumentException raised for placeholders in the host.
  • FileMonitorConfiguration in the Config monitor module: warn and error logs about placeholder or unresolvable repository URIs.

Test coverage

The commit adds ScmUriUtilsTests, covering user plus password, user only, access token as username, scp, ssh://, file:, an @ in the path, placeholders, pre-encoded paths, ports, an unencoded @ in the password, unparseable URIs, idempotency, and null or empty input. EnvironmentCleanerTests covers names and origins. In JGitEnvironmentRepositoryTests and SVNKitEnvironmentRepositoryTests, new end-to-end tests stub out the network checkout and verify that no property source name contains ryan or secret. Another test confirms that the clone failure exception message is masked.

Upgrade path

For OSS users, upgrade the Spring Cloud Config Server dependency to 5.0.7, or import the Spring Cloud dependencies BOM at 2025.1.5. Spring Cloud is not managed by the Spring Boot BOM, so a Boot upgrade alone will not pull in this fix.

Affected systems and versions

Per the Spring advisory, the following Spring Cloud Config versions are affected:

  • 5.0.0 through 5.0.6: fixed in 5.0.7 (OSS) and 5.0.6.1 (Enterprise Support Only)
  • 4.3.0 through 4.3.5: fixed in 4.3.6 (Enterprise Support Only)
  • 4.0.0 through 4.2.9: fixed in 4.2.10 (Enterprise Support Only)
  • 3.1.0 through 3.1.15: fixed in 3.1.16 (Enterprise Support Only)

Vulnerable configuration: the disclosure is triggered when the Config Server uses a Git or SVN backend whose repository URI contains credentials in its userinfo section (for example https://user:token@host/repo.git). Running an affected version is necessary but not sufficient. The repository authentication configuration determines exposure.

Interim measures from the advisory, for installations that cannot upgrade immediately:

  • Avoid embedding credentials in the repository URI.
  • Use SSH keys, or the separate spring.cloud.config.server.git.username and spring.cloud.config.server.git.password properties. These property names are Git specific, and the advisory does not name SVN equivalents.
  • Restrict Config Server access to trusted clients.

Spring's general Config documentation already recommends placing HTTP Basic repository credentials in separate username and password properties rather than in the URL. Authentication and TLS on the Config Server endpoint protect access and transport, but they do not stop a vulnerable server from including the credential in responses to permitted clients. The advisory does not describe a procedure for credentials that may already have been disclosed.

Vendor security history

Spring is stewarded by Broadcom, and NVD lists VMware as the CNA for this record, which is why the same issue can appear under all three names. Broadcom states that Spring is used by over half of Fortune 500 companies, a vendor-supplied figure rather than a measured install base for Config Server.

The most widely known prior case is CVE-2022-22965 (Spring4Shell), a separate critical Spring Framework vulnerability for which Spring directed users to Framework 5.3.18 or 5.2.20.RELEASE. Microsoft reported a low volume of exploitation attempts in April 2022, including attempts aligned with the public web shell proof of concept. That history shows Spring vulnerabilities attract attacker attention, but it says nothing about exploitation of CVE-2026-59435, which involves a different component and mechanism.

Spring's current security policy routes reports through private GitHub vulnerability reporting and publishes advisories centrally, without committing to a specific response time. For this issue, the vendor shipped an OSS fix within the Spring Cloud 2025.1.5 release train one day after the advisory, alongside enterprise backports for older branches.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization