CVE-2024-6104 go-retryablehttp can leak basic auth credentials to log files

Medium 6.0 Published Updated

An attacker with log access can read sensitive HTTP basic auth credentials leaked by the go-retryablehttp library.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-6104?

CVE-2024-6104 is a medium-severity vulnerability in HashiCorp Shared library, published on 24 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

go-retryablehttp prior to 0.7.7 did not sanitize urls when writing them to its log file. This could lead to go-retryablehttp writing sensitive HTTP basic auth credentials to its log file. This vulnerability, CVE-2024-6104, was fixed in go-retryablehttp 0.7.7.

Weakness: CWE-532

Which versions are affected by CVE-2024-6104?

3 open source packages ship an affected version, including github.com/hashicorp/go-retryablehttp. It affects 1 product.

PackageAffectedFixed in
github.com/hashicorp/go-retryablehttp GoAll versions0.7.7
github.com/hashicorp/go-retryablehttp GoAll versions0.7.7
github.com/hashicorp/go-retryablehttp GoAll versions0.7.7
Linux distribution packages (20)
podman SUSE:Enterprise Storage 7.1All versions4.9.5-150300.9.34.1
podman SUSE:Linux Enterprise Micro 5.1All versions4.9.5-150300.9.34.1
podman SUSE:Linux Enterprise Micro 5.2All versions4.9.5-150300.9.34.1
podman SUSE:Linux Enterprise Micro 5.3All versions4.9.5-150400.4.30.1
podman SUSE:Linux Enterprise Micro 5.3All versions4.9.5-150400.4.30.1
podman SUSE:Linux Enterprise Micro 5.4All versions4.9.5-150400.4.30.1
podman SUSE:Linux Enterprise Micro 5.4All versions4.9.5-150400.4.30.1
podman SUSE:Linux Enterprise Micro 5.5All versions4.9.5-150500.3.15.1
podman SUSE:Linux Enterprise Module for Containers 15 SP5All versions4.9.5-150500.3.15.1
podman SUSE:Linux Enterprise Module for Containers 15 SP6All versions4.9.5-150500.3.15.1
gh SUSE:Package Hub 15 SP5All versions2.53.0-bp155.2.12.1
gh SUSE:Package Hub 15 SP6All versions2.53.0-bp156.2.6.1
gh openSUSE:Leap 15.5All versions2.53.0-bp155.2.12.1
podman openSUSE:Leap 15.5All versions4.9.5-150500.3.15.1
gh openSUSE:Leap 15.6All versions2.53.0-bp156.2.6.1
podman openSUSE:Leap 15.6All versions4.9.5-150500.3.15.1
gh openSUSE:TumbleweedAll versions2.53.0-1.1
golang-github-prometheus-prometheus openSUSE:TumbleweedAll versions2.53.0-2.1
podman openSUSE:TumbleweedAll versions5.1.1-2.1
teleport openSUSE:TumbleweedAll versions15.4.7-1.1

Products include Hashicorp Retryablehttp.

How do I fix CVE-2024-6104?

Upgrade github.com/hashicorp/go-retryablehttp to 0.7.7 or later.

Is CVE-2024-6104 being exploited?

There is no known exploitation of CVE-2024-6104 in the wild and no public exploit code.

Sources

Also known as AZL-42874, AZL-42877, AZL-42880, AZL-42886, AZL-42892, AZL-42898 and 33 more.

Is CVE-2024-6104 in your software?

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

Check your SBOMs for free