CVE-2024-40636
JSON

5.3medium

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

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.42% (higher than 38% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vmcp-66r5-3pcp

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.

Affected

Product or packageVersionsReported by
SteeltoeOSS security-advisories< 3.2.8CVE List
steeltoeoss discoverybefore 3.2.8CVE List
Steeltoe.Discovery.Eureka (NuGet)before 3.2.8GitHub Advisory Database
Steeltoe.Discovery.EurekaBase (NuGet)up to 2.5.5GitHub Advisory Database
Steeltoe.Discovery.ClientCore (NuGet)all versionsGitHub Advisory Database
Steeltoe.Discovery.ClientAutofac (NuGet)up to 2.5.5GitHub Advisory Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub2.5low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
GitHublow CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-532

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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:password@eureka2.com: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

NVD (es)

Steeltoe es un proyecto de código abierto que proporciona una colección de librerías que ayudan a los usuarios a crear aplicaciones nativas de la nube de nivel de producción mediante configuración externalizada, descubrimiento de servicios, seguimiento distribuido, gestión de aplicaciones y más. Cuando se utilizan varias URL del servicio del servidor Eureka con autenticación básica y se produce un problema al obtener el registro del servicio, se registra un error con las URL del servicio del servidor Eureka, pero solo se enmascara la primera URL. El código en cuestión es `_logger.LogError(e, "FetchRegistry Failed for Eureka service urls: {EurekaServerServiceUrls}", new Uri(ClientConfig.EurekaServerServiceUrls).ToMaskedString());` en el archivo `DiscoveryClient.cs` que puede filtrarse credenciales en registros. Este problema se solucionó en la versión 3.2.8 del paquete nuget Steeltoe.Discovery.Eureka.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-40636 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-vmcp-66r5-3pcp changed 2026-09-10CC-BY-4.0
NVDCVE-2024-40636 changed 2026-06-17Public domain