# CVE-2024-45336: Sensitive headers incorrectly sent after cross-domain redirect in net/http

> Go's HTTP client may leak sensitive headers to unintended domains after specific redirect chains, exposing credentials to attackers.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 28 Jan 2025
- **Updated:** 18 Sep 2025
- **Also known as:** AZL-55998, AZL-56005, AZL-56058, AZL-78950, AZL-98790, BELL-CVE-2024-45336, BIT-golang-2024-45336, CLEANSTART-2026-HM31104, CLEANSTART-2026-LL13188, DEBIAN-CVE-2024-45336, ECHO-befe-522f-1557, GHSA-7wrw-r4p8-38rx, GO-2025-3420, MINI-2q68-98wq-g6qw, MINI-2w3m-4wx3-6cw7, MINI-62mr-r4xm-ff25, MINI-89xq-274g-r6wj, MINI-8j6x-h8w3-v8gj, MINI-8mpj-x8hm-mcvr, MINI-c6hg-72j8-cw9f, MINI-f678-w2hf-7xgx, MINI-g7jr-fw43-vw55, MINI-gw8h-m4x5-6qm4, MINI-hj7g-56hv-3mmm, MINI-jf22-729g-xwvx, MINI-jhcm-4mpr-vxpw, MINI-mc9f-rhmf-9x7c, MINI-mr33-9827-hx6c, MINI-px4x-r2qf-mvp2, MINI-r859-j56r-24m9, MINI-wcgc-jfhf-w866, RHSA-2025:9514, UBUNTU-CVE-2024-45336

## What is CVE-2024-45336?

CVE-2024-45336 is a medium-severity vulnerability in Go standard library net/http, published on 28 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The HTTP client drops sensitive headers after following a cross-domain redirect. For example, a request to a.com/ containing an Authorization header which is redirected to b.com/ will not send that header to b.com. In the event that the client received a subsequent same-domain redirect, however, the sensitive headers would be restored. For example, a chain of redirects from a.com/, to b.com/1, and finally to b.com/2 would incorrectly send the Authorization header to b.com/2.

## Which versions are affected by CVE-2024-45336?

2 open source packages ship an affected version, including golang and stdlib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.22.11, 1.23.5, 1.24.0 |
| `stdlib` | Go | All versions | 1.22.11, 1.23.5, 1.24.0-rc.2 |
| `rhc` | Red Hat:enterprise_linux:10.0 | All versions | 1:0.3.2-1.el10_0 |
| `rhc-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 1:0.3.2-1.el10_0 |
| `rhc-debugsource` | Red Hat:enterprise_linux:10.0 | All versions | 1:0.3.2-1.el10_0 |

## How do I fix CVE-2024-45336?

Upgrade golang to a fixed version for your release line: 1.22.11, 1.23.5 or 1.24.0.

## Is CVE-2024-45336 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-45336 and fix it if it is affected.

What it is: CVE-2024-45336 is a medium-severity vulnerability in Go standard library net/http, published on 28 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-45336 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang (Bitnami): affected all versions; fixed in 1.22.11, 1.23.5, 1.24.0
- stdlib (Go): affected all versions; fixed in 1.22.11, 1.23.5, 1.24.0-rc.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-45336/ (Markdown: https://insights.sbomify.com/CVE-2024-45336/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-45336
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-45336
- OSV: https://osv.dev/vulnerability/CVE-2024-45336

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-45336/
Summaries are generated and may contain mistakes; the official description above is the record.
