CVE-2023-45289
Medium · 4.3CVSS
4.3
EPSS
1.1%
Published
Mar 5, 2024
CISA due date
—
Cloudanix analysis
A flaw in a common software component could cause applications to accidentally send sensitive information, like login tokens, to the wrong server when being redirected.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Other
- Component
- Library
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A flaw in Go's standard library http.Client causes it to improperly handle sensitive headers (such as 'Authorization' and 'Cookie') during cross-domain HTTP redirects. When a vulnerable client follows a redirect, it may fail to strip these headers from the new request, sending them to the destination server. This results in the leakage of sensitive credentials like API keys or session tokens to the redirect target.
Why it matters to the business
Exploitation of this vulnerability can lead to the theft of user or service credentials, enabling attackers to gain unauthorized access to accounts and systems. This could result in data breaches, account takeovers, financial fraud, and reputational damage. The risk is highest for applications that make HTTP requests to user-supplied or untrusted URLs.
How an attack unfolds
An attacker first needs to position themselves to control a web server that a vulnerable Go-based application will interact with. This could be achieved by tricking a user or the application into making a request to a malicious URL. The attacker's server then responds with an HTTP 3xx redirect message, pointing the client to a different domain, also controlled by the attacker. A vulnerable Go http.Client, upon receiving the redirect, will follow it but fail to clear the sensitive headers from the original request. Consequently, the client sends a new request to the attacker's second domain, but this request now includes the original 'Authorization' or 'Cookie' headers, delivering the credentials directly to the attacker.
How to fix it
This vulnerability is fixed in the Go standard library. To remediate, upgrade the Go toolchain to version 1.21.8 or 1.20.13 (or newer). After upgrading the build environment, all Go applications must be recompiled and redeployed to ensure they incorporate the patched http.Client implementation.
How to confirm the fix worked
To confirm remediation, verify that all Go applications are built with a non-vulnerable version of the Go toolchain (1.21.8+ or 1.20.13+). This can be checked by running `go version <path_to_binary>` on compiled application artifacts. To test for exposure, create a test case where a Go client connects to a controlled endpoint that issues a cross-domain redirect, and use network monitoring tools to confirm that 'Authorization' and 'Cookie' headers are not forwarded in the redirected request.
Typical attack path
- An attacker identifies a Go application that makes HTTP requests to external or user-controllable URLs.
- The attacker induces the application to make a request to a server they control.
- The attacker's server responds with an HTTP redirect (e.g., 301, 302, 307) to a different, attacker-controlled domain.
- The vulnerable Go client follows the redirect without stripping sensitive headers like 'Authorization' or 'Cookie'.
- The client sends the request, including the sensitive headers, to the attacker's second domain.
- The attacker captures the headers, stealing the session token or API key.
- The attacker uses the stolen credentials to impersonate the user or service and gain unauthorized access.
How to detect it
Detecting historical exploitation requires detailed network or application logs. Analysts should search for patterns where an outbound request from a Go application receives an HTTP 3xx redirect response, and the subsequent request to the new domain unexpectedly contains sensitive internal headers like 'Authorization' or 'Cookie'. Correlating application logs with outbound web proxy or firewall logs can help identify requests to untrusted domains that may have been the target of a credential-stealing redirect.
What your security team should do
- Identify all applications built with Go that make outbound HTTP requests and catalog the Go version used in their build pipelines.
- Prioritize upgrading all Go build environments to use Go version 1.21.8+ or 1.20.13+.
- Trigger recompilation and redeployment for all identified Go applications to ensure the fix is active in production.
- As a defense-in-depth measure, review application logic to restrict or validate URLs used in HTTP requests, minimizing interaction with untrusted endpoints.
The record
When following an HTTP redirect to a domain which is not a subdomain match or exact match of the initial domain, an http.Client does not forward sensitive headers such as "Authorization" or "Cookie". For example, a redirect from foo.com to www.foo.com will forward the Authorization header, but a redirect to bar.com will not. A maliciously crafted HTTP redirect could cause sensitive headers to be unexpectedly forwarded.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | stdlib | 0 | 1.21.8 |
| AlmaLinux:8 | delve | 0 | 1.21.2-3.module_el8.10.0+3760+4dd778f9 |
| AlmaLinux:8 | git-lfs | 0 | 3.4.1-2.el8_10 |
| AlmaLinux:8 | go-toolset | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang-bin | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang-docs | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang-misc | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang-src | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:8 | golang-tests | 0 | 1.21.9-1.module_el8.10.0+3840+edaca3c3 |
| AlmaLinux:9 | git-lfs | 0 | 3.4.1-2.el9_4 |
| AlmaLinux:9 | go-toolset | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang-bin | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang-docs | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang-misc | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang-src | 0 | 1.21.9-2.el9_4 |
| AlmaLinux:9 | golang-tests | 0 | 1.21.9-2.el9_4 |
| Bitnami | golang | 0 | 1.21.8 |
| Chainguard | actions-runner-controller | 0 | 0.8.3-r1 |
| Chainguard | actions-runner-controller-compat | 0 | 0.8.3-r1 |
| Chainguard | amass | 0 | 4.2.0-r4 |
| Chainguard | argo-cd-2.7 | 0 | 2.7.17-r1 |
| Chainguard | argo-cd-2.7-compat | 0 | 2.7.17-r1 |
| Chainguard | argo-cd-2.7-repo-server | 0 | 2.7.17-r1 |
| Chainguard | argo-cd-fips-2.10 | 0 | 2.10.2-r1 |
| Chainguard | argo-cd-fips-2.10-compat | 0 | 2.10.2-r1 |
| Chainguard | argo-cd-fips-2.10-repo-server | 0 | 2.10.2-r1 |
| Chainguard | argo-cd-fips-2.9 | 0 | 2.9.6-r1 |
| Chainguard | argo-cd-fips-2.9-compat | 0 | 2.9.6-r1 |
| Chainguard | argo-cd-fips-2.9-repo-server | 0 | 2.9.6-r1 |
| Chainguard | argo-workflow-cli | 0 | 3.6.5-r2 |
| Chainguard | argo-workflow-cli-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflow-controller | 0 | 3.6.5-r2 |
| Chainguard | argo-workflow-controller-compat | 0 | 3.6.5-r2 |
| Chainguard | argo-workflow-controller-compat-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflow-controller-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflow-executor | 0 | 3.6.5-r2 |
| Chainguard | argo-workflow-executor-compat | 0 | 3.6.5-r2 |
| Chainguard | argo-workflow-executor-compat-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflow-executor-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflows | 0 | 3.6.5-r2 |
| Chainguard | argo-workflows-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflows-known-hosts | 0 | 3.6.5-r2 |
| Chainguard | argo-workflows-known-hosts-fips | 0 | 3.5.5-r1 |
| Chainguard | argo-workflows-ui | 0 | 3.6.5-r2 |
| Chainguard | atlantis-fips | 0 | 0.33.0-r6 |
| Chainguard | aws-ebs-csi-driver | 0 | 1.28.0-r1 |
| Chainguard | aws-ebs-csi-driver-1.18 | 0 | 1.18.0-r11 |
| Chainguard | aws-ebs-csi-driver-1.19 | 0 | 1.19.0-r11 |
| Chainguard | aws-ebs-csi-driver-fips | 0 | 1.28.0-r1 |
| Chainguard | aws-efs-csi-driver | 0 | 1.7.6-r1 |
| Chainguard | aws-efs-csi-driver-fips | 0 | 1.7.0-r4 |
| Chainguard | aws-efs-csi-driver-fips-1.6 | 0 | 1.6.0-r4 |
| Chainguard | aws-flb-cloudwatch | 0 | 1.9.4-r7 |
| Chainguard | aws-flb-cloudwatch-compat | 0 | 1.9.4-r7 |
| Chainguard | aws-flb-firehose | 0 | 1.7.2-r7 |
| Chainguard | aws-flb-firehose-compat | 0 | 1.7.2-r7 |
| Chainguard | aws-flb-kinesis | 0 | 1.10.2-r7 |
| Chainguard | aws-flb-kinesis-compat | 0 | 1.10.2-r7 |
| Chainguard | aws-load-balancer-controller | 0 | 2.7.1-r1 |
| Chainguard | aws-load-balancer-controller-2.4.5 | 0 | 2.4.5-r9 |
| Chainguard | aws-load-balancer-controller-2.5 | 0 | 2.5.4-r2 |
| Chainguard | aws-load-balancer-controller-compat | 0 | 2.7.1-r1 |
| Chainguard | aws-load-balancer-controller-compat-2.4.5 | 0 | 2.5.4-r2 |
| Chainguard | aws-load-balancer-controller-fips | 0 | 2.7.1-r1 |
| Chainguard | azure-aad-pod-identity-mic | 0 | 1.8.17-r5 |
| Chainguard | azure-aad-pod-identity-nmi | 0 | 1.8.17-r5 |
| Chainguard | bank-vaults-fips | 0 | 1.20.4-r5 |
| Chainguard | bank-vaults-template-fips | 0 | 1.20.4-r5 |
| Chainguard | bazelisk | 0 | 1.19.0-r1 |
| Chainguard | bazelisk-default | 0 | 1.19.0-r1 |
| Chainguard | bom | 0 | 0.6.0-r1 |
| Chainguard | boring-registry-fips | 0 | 0.13.2-r1 |
| Chainguard | buildctl | 0 | 0.13.1-r2 |
| Chainguard | buildkitd | 0 | 0.13.1-r2 |
| Chainguard | caddy | 0 | 2.7.6-r3 |
| Chainguard | caddy-man | 0 | 2.7.6-r3 |
| Chainguard | caddy-src | 0 | 2.7.6-r3 |
| Chainguard | cadvisor | 0 | 0.49.1-r3 |
| Chainguard | cadvisor-compat | 0 | 0.49.1-r3 |
| Chainguard | calico | 0 | 3.27.2-r2 |
| Chainguard | calico-apiserver | 0 | 3.27.2-r2 |
| Chainguard | calico-app-policy | 0 | 3.27.2-r2 |
| Chainguard | calico-cni | 0 | 3.27.2-r2 |
| Chainguard | calico-cni-compat | 0 | 3.27.2-r2 |
| Chainguard | calico-cni-fips-compat | 0 | 3.27.2-r1 |
| Chainguard | calico-felix | 0 | 3.27.2-r2 |
| Chainguard | calico-fips | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-apiserver | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-app-policy | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-cni | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-felix | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-key-cert-provisioner | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-kube-controllers | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-node | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-pod2daemon | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-typha-client | 0 | 3.27.2-r1 |
| Chainguard | calico-fips-typhad | 0 | 3.27.2-r1 |
| Chainguard | calico-key-cert-provisioner | 0 | 3.27.2-r2 |
| Chainguard | calico-kube-controllers | 0 | 3.27.2-r2 |
| Chainguard | calico-node | 0 | 3.27.2-r2 |
| Chainguard | calico-pod2daemon | 0 | 3.27.2-r2 |
| Chainguard | calico-pod2daemon-flexvol-compat | 0 | 3.27.2-r2 |
| Chainguard | calico-typha-client | 0 | 3.27.2-r2 |
| Chainguard | calico-typhad | 0 | 3.27.2-r2 |
| Chainguard | calicoctl | 0 | 3.27.2-r2 |
| Chainguard | calicoctl-fips | 0 | 3.27.2-r1 |
| Chainguard | capslock | 0 | 0.2.1-r1 |
| Chainguard | cass-operator | 0 | 1.18.2-r4 |
| Chainguard | cass-operator-compat | 0 | 1.18.2-r4 |
| Chainguard | cass-operator-compat-fips | 0 | 1.18.2-r3 |
| Chainguard | cass-operator-config | 0 | 1.18.2-r4 |
| Chainguard | cass-operator-fips | 0 | 1.18.2-r3 |
| Chainguard | cass-operator-fips-no-pvc-delete | 0 | 1.18.2-r4 |
| Chainguard | cass-operator-fips-no-pvc-delete-compat | 0 | 1.18.2-r4 |
| Chainguard | cert-exporter | 0 | 2.12.0-r1 |
| Chainguard | cert-exporter-fips | 0 | 2.12.0-r1 |
| Chainguard | cert-manager-fips-1.13 | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.13-acmesolver | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.13-cainjector | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.13-cmctl | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.13-controller | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.13-webhook | 0 | 1.13.4-r1 |
| Chainguard | cert-manager-fips-1.14 | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-acmesolver | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-cainjector | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-cmctl | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-controller | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-startupapicheck | 0 | 1.14.3-r1 |
| Chainguard | cert-manager-fips-1.14-webhook | 0 | 1.14.3-r1 |
| Chainguard | cfssl | 0 | 1.6.5-r0 |
| Chainguard | cfssl-bundle | 0 | 1.6.5-r0 |
| Chainguard | cfssl-certinfo | 0 | 1.6.5-r0 |
| Chainguard | cfssl-cfssl-bundle | 0 | 1.6.5-r0 |
| Chainguard | cfssl-cfssl-certinfo | 0 | 1.6.5-r0 |
| Chainguard | cfssl-cfssl-newkey | 0 | 1.6.5-r0 |
| Chainguard | cfssl-cfssl-scan | 0 | 1.6.5-r0 |
| Chainguard | cfssl-cfssljson | 0 | 1.6.5-r0 |
| Chainguard | cfssl-json | 0 | 1.6.5-r0 |
| Chainguard | cfssl-mkbundle | 0 | 1.6.5-r0 |
| Chainguard | cfssl-multirootca | 0 | 1.6.5-r0 |
| Chainguard | cfssl-newkey | 0 | 1.6.5-r0 |
| Chainguard | cfssl-scan | 0 | 1.6.5-r0 |
| Chainguard | chainctl | 0 | 0.2.59-r0 |
| Chainguard | chartmuseum | 0 | 0.16.1-r4 |
| Chainguard | cloud-sql-proxy | 0 | 2.9.0-r1 |
| Chainguard | cloud-sql-proxy-compat | 0 | 2.9.0-r1 |
| Chainguard | cloud-sql-proxy-fips | 0 | 2.8.2-r1 |
| Chainguard | cloud-sql-proxy-fips-compat | 0 | 2.8.2-r1 |
| Chainguard | cluster-api-controller | 0 | 1.6.3-r0 |
| Chainguard | cluster-autoscaler-1.25 | 0 | 1.25.3-r10 |
| Chainguard | cluster-autoscaler-1.25-compat | 0 | 1.25.3-r10 |
| Chainguard | cluster-autoscaler-1.27 | 0 | 1.27.5-r2 |
| Chainguard | cluster-autoscaler-1.27-compat | 0 | 1.27.5-r2 |
| Chainguard | cluster-autoscaler-1.28 | 0 | 1.28.2-r2 |
| Chainguard | cluster-autoscaler-1.28-compat | 0 | 1.28.2-r2 |
| Chainguard | cluster-autoscaler-1.29 | 0 | 1.29.0-r1 |
| Chainguard | cluster-autoscaler-1.29-compat | 0 | 1.29.0-r1 |
| Chainguard | cluster-autoscaler-fips-1.25 | 0 | 1.25.3-r5 |
| Chainguard | cluster-autoscaler-fips-1.25-compat | 0 | 1.25.3-r5 |
| Chainguard | cluster-autoscaler-fips-1.26 | 0 | 1.26.6-r2 |
| Chainguard | cluster-autoscaler-fips-1.26-compat | 0 | 1.26.6-r2 |
| Chainguard | cluster-autoscaler-fips-1.27 | 0 | 1.27.5-r1 |
| Chainguard | cluster-autoscaler-fips-1.27-compat | 0 | 1.27.5-r1 |
| Chainguard | cluster-autoscaler-fips-1.28 | 0 | 1.28.2-r2 |
| Chainguard | cluster-autoscaler-fips-1.28-compat | 0 | 1.28.2-r2 |
| Chainguard | cluster-proportional-autoscaler | 0 | 1.8.11-r1 |
| Chainguard | cluster-proportional-autoscaler-compat | 0 | 1.8.11-r1 |
| Chainguard | clusterctl | 0 | 1.6.3-r0 |
| Chainguard | cmctl-1.13-fips | 0 | 1.13.4-r1 |
| Chainguard | cmctl-1.14-fips | 0 | 1.14.3-r1 |
| Chainguard | cni-plugins | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-aws-k8s-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-bandwidth | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-bandwidth-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-bridge | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-bridge-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-dhcp | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-dhcp-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-dummy | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-dummy-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-bandwidth | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-bandwidth-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-bridge | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-bridge-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-dhcp | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-dhcp-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-dummy | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-dummy-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-firewall | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-firewall-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-host-device | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-host-device-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-host-local | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-host-local-compat | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-ipam | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-ipvlan | 0 | 1.4.0-r2 |
| Chainguard | cni-plugins-fips-ipvlan-compat | 0 | 1.4.0-r2 |
Related vulnerabilities
- CVE-2025-68121 During session resumption in crypto/tls, if the underlying Config has its ClientCAs or… Also affects stdlib
- CVE-2025-22873 It was possible to improperly access the parent directory of an os.Root by opening a… Also affects stdlib
- GO-2026-4403 Improper access to parent directory of root in os Also affects stdlib
- CVE-2025-61726 The net/url package does not set a limit on the number of query parameters in a query. Also affects stdlib
- CVE-2025-61728 archive/zip uses a super-linear file name indexing algorithm that is invoked the first… Also affects stdlib
- CVE-2025-61730 During the TLS 1.3 handshake if multiple messages are sent in records that span… Also affects stdlib
- CVE-2025-61727 An excluded subdomain constraint in a certificate chain does not restrict the usage of… Also affects stdlib
- CVE-2025-61729 Within HostnameError.Error(), when constructing an error string, there is no limit to the… Also affects stdlib