CVE-2024-40636 Basic Auth Credential Leakage to Logs After Fetch Registry Error in Steeltoe.Discovery.Eureka with Peer Awareness

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
Steeltoe.Discovery.ClientAutofac NuGetAll versions to 2.5.5None
Steeltoe.Discovery.ClientAutofac NuGetAll versions to 2.5.5None
Steeltoe.Discovery.ClientCore NuGetAll versionsNone
Steeltoe.Discovery.ClientCore NuGetAll versionsNone
Steeltoe.Discovery.Eureka NuGetAll versions3.2.8
Steeltoe.Discovery.Eureka NuGetAll versions3.2.8
2 more packages
Steeltoe.Discovery.EurekaBase NuGetAll versions to 2.5.5None
Steeltoe.Discovery.EurekaBase NuGetAll versions to 2.5.5None

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.

Is CVE-2024-40636 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free