GitHub Advisoryadvisory · NuGet
GHSA-vmcp-66r5-3pcp Steeltoe Leaks Basic Auth Credentials to Logs After Fetch Registry Error
LOW
Official page ↗
- Aliases
- CVE-2024-40636
- Ecosystem
- NuGet
- Packages
- Steeltoe.Discovery.Eureka, Steeltoe.Discovery.EurekaBase, Steeltoe.Discovery.ClientCore, Steeltoe.Discovery.ClientAutofac
- Severity
- Low
- CVSS vector
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- Weaknesses
- CWE-532
- Reviewed
- 2024-07-17
Affected packages
• NuGet Steeltoe.Discovery.Eureka: < 3.2.8 → fixed in 3.2.8
• NuGet Steeltoe.Discovery.EurekaBase: <= 2.5.5 (no fix yet)
• NuGet Steeltoe.Discovery.ClientCore: < 3.0.0 (no fix yet)
• NuGet Steeltoe.Discovery.ClientAutofac: <= 2.5.5 (no fix yet)
Description
Summary
When utilizing multiple Eureka server service URLs with basic auth and encountering an issue with fetching the service registry, an error is logged with the Eureka server service URLs but only the first URL is masked.
Details
Package: Steeltoe.Discovery.Eureka
Package version: 3.2.1
Branch: "release/3.2"
File name: `DiscoveryClient.cs`
Line number: 325
Code in question: `_logger.LogError(e, "FetchRegistry Failed for Eureka service urls: {EurekaServerServiceUrls}", new Uri(ClientConfig.EurekaServerServiceUrls).ToMaskedString());`
Error message in logs: `FetchRegistry Failed for Eureka service urls: https://**:**@eureka1.com:443/eureka,https://user:[email protected]:443/eureka`
I thought `new Uri(clientOptions.EurekaServerServiceUrls)` would throw a `UriFormatException` since there are multiple URLs but my logs are showing two URLs regardless.
PoC
1. Set Eureka config with multiple server URLs with basic auth
2. Apologies for not being more descriptive for this step, but I believe we would just need to trigger an exception in `FetchFullRegistryAsync`.
3. Check the logs and should see the error
Impact
Vulnerability: Credential leakage in the logs
Who does it impact?: Users who are using peer awareness with Spring Eureka
Related
Alias · CVE (1)
- CVE-2024-40636 Steeltoe is an open source project that provides a collection of libraries that helps users build production-grade cloud-native… vulnerability
Weakness · CWE (1)
- CWE-532 Insertion of Sensitive Information into Log File weakness