CVE-2024-40636 Basic Auth Credential Leakage to Logs After Fetch Registry Error in Steeltoe.Discovery.Eureka with Peer Awareness
Attackers with log access can view unmasked Basic Auth credentials when multiple Eureka server URLs are configured and a fetch error occurs.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-40636?
CVE-2024-40636 is a medium-severity vulnerability in SteeltoeOSS security-advisories, published on 17 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Steeltoe is an open source project that provides a collection of libraries that helps users build production-grade cloud-native applications using externalized configuration, service discovery, distributed tracing, application management, and more. 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. The code in question is `_logger.LogError(e, "FetchRegistry Failed for Eureka service urls: {EurekaServerServiceUrls}", new Uri(ClientConfig.EurekaServerServiceUrls).ToMaskedString());` in the `DiscoveryClient.cs` file which may leak credentials into logs. This issue has been addressed in version 3.2.8 of the Steeltoe.Discovery.Eureka nuget package.
Weakness: CWE-532
Which versions are affected by CVE-2024-40636?
8 open source packages ship an affected version, including Steeltoe.Discovery.ClientAutofac, Steeltoe.Discovery.ClientCore and Steeltoe.Discovery.Eureka.
| Package | Affected | Fixed in |
|---|---|---|
Steeltoe.Discovery.ClientAutofac NuGet | All versions to 2.5.5 | None |
Steeltoe.Discovery.ClientAutofac NuGet | All versions to 2.5.5 | None |
Steeltoe.Discovery.ClientCore NuGet | All versions | None |
Steeltoe.Discovery.ClientCore NuGet | All versions | None |
Steeltoe.Discovery.Eureka NuGet | All versions | 3.2.8 |
Steeltoe.Discovery.Eureka NuGet | All versions | 3.2.8 |
2 more packages
Steeltoe.Discovery.EurekaBase NuGet | All versions to 2.5.5 | None |
Steeltoe.Discovery.EurekaBase NuGet | All versions to 2.5.5 | None |
How do I fix CVE-2024-40636?
Upgrade to a fixed version.
Is CVE-2024-40636 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-40636 exists.
Sources
Also known as GHSA-vmcp-66r5-3pcp.