6.9medium
follow-redirects: Custom Authentication Headers Leaked to Cross-Domain Redirect Targets
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.64% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r4q5-vmmm-2653
Description
follow-redirects is an open source, drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. Prior to 1.16.0, when an HTTP request follows a cross-domain redirect (301/302/307/308), follow-redirects only strips authorization, proxy-authorization, and cookie headers (matched by regex at index.js). Any custom authentication header (e.g., X-API-Key, X-Auth-Token, Api-Key, Token) is forwarded verbatim to the redirect target. This vulnerability is fixed in 1.16.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| follow-redirects follow-redirects | < 1.16.0 | CVE List |
| cryostat/cryostat-openshift-console-plugin-rhel9 | Not specified Not affected: from 4.2.0-9 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9 | Not specified Not affected: from 1781116645 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf5-rhel9 | Not specified Not affected: from 1781116658 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf6-rhel9 | Not specified Not affected: from 1781116387 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-rhel9 | Not specified Not affected: from 1781116392 before * | CVE List |
| multicluster-engine/console-mce-rhel9 | Not specified Not affected: from 1780917531 before *, from 1780910888 before *, from 1778511348 before *, from 1778383863 before *, from 1778532610 before * | CVE List |
| network-observability/network-observability-console-plugin-compat-rhel9 | Not specified Not affected: from 1778508956 before * | CVE List |
| network-observability/network-observability-console-plugin-rhel9 | Not specified Not affected: from 1778510461 before * | CVE List |
| rhacm2/console-rhel9 | Not specified Not affected: from 1783451729 before *, from 1780876734 before *, from 1780600823 before * | CVE List |
| advanced-cluster-security/rhacs-main-rhel8 | Not specified Not affected: from 1779371594 before *, from 1779293013 before * | CVE List |
| ansible-automation-platform-25/lightspeed-rhel8 | Not specified Not affected: from 1780082949 before * | CVE List |
| rhdh/rhdh-hub-rhel9 | Not specified Not affected: from 1779841586 before *, from 1777903262 before * | CVE List |
| discovery/discovery-ui-rhel9 | Not specified Not affected: from 1778156756 before * | CVE List |
| rhmtc/openshift-migration-ui-rhel8 | Not specified Not affected: from 1783690532 before * | CVE List |
| mta/mta-ui-rhel9 | Not specified Not affected: from 1785169013 before * | CVE List |
| rhoai/odh-dashboard-rhel9 | Not specified Not affected: from 1780467029 before *, from 1779189627 before * | CVE List |
| rhoai/odh-mod-arch-model-registry-rhel9 | Not specified Not affected: from 1780467147 before *, from 1778666987 before * | CVE List |
| rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9 | Not specified Not affected: from 1787801527 before * | CVE List |
| rhoai/odh-mod-arch-gen-ai-rhel9 | Not specified Not affected: from 1778473763 before * | CVE List |
| openshift4/ose-console-rhel9 | Not specified Not affected: from 1784803344 before *, from 1785278569 before *, from 1784634877 before *, from 1784731014 before *, from 1784713762 before *, from 1784125329 before * | CVE List |
| openshift4/ose-monitoring-plugin-rhel9 | Not specified Not affected: from 1781708434 before *, from 1781695012 before *, from 1781731914 before * | CVE List |
| devspaces/code-rhel9 | Not specified Not affected: from 1779814592 before * | CVE List |
| devspaces/dashboard-rhel9 | Not specified Not affected: from 1779341289 before * | CVE List |
| devspaces/openvsx-rhel9 | Not specified Not affected: from 1779528224 before * | CVE List |
| devspaces/pluginregistry-rhel9 | Not specified Not affected: from 1779359423 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel8 | Not specified Not affected: from 1778191473 before * | CVE List |
| openshift-service-mesh/kiali-rhel8 | Not specified Not affected: from 1778191378 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel9 | Not specified Not affected: from 1778163785 before *, from 1778163935 before *, from 1778163792 before * | CVE List |
| openshift-service-mesh/kiali-rhel9 | Not specified Not affected: from 1778164208 before *, from 1778164042 before *, from 1778163909 before *, from 1778163986 before * | CVE List |
| quay/quay-rhel8 | Not specified Not affected: from 1779822261 before *, from 1779811412 before *, from 1779689392 before *, from 1780891395 before *, from 1779811473 before * | CVE List |
| quay/quay-rhel9 | Not specified Not affected: from 1779204086 before *, from 1779922205 before * | CVE List |
| cryostat-openshift-console-plugin-npm | Not specified | CVE List |
| follow-redirects | Not specified | CVE List |
| gatekeeper/gatekeeper-rhel9 | Not specified | CVE List |
| mta/mta-ui-rhel8 | Not specified | CVE List |
| migration-toolkit-virtualization/mtv-console-plugin-rhel9 | Not specified | CVE List |
| mtv-candidate/mtv-console-plugin-rhel9 | Not specified | CVE List |
| workload-availability/node-healthcheck-must-gather-rhel9 | Not specified | CVE List |
| workload-availability/node-healthcheck-operator-bundle | Not specified | CVE List |
| workload-availability/node-healthcheck-rhel9-operator | Not specified | CVE List |
| openshift-lightspeed/lightspeed-console-plugin-419-rhel9 | Not specified | CVE List |
| openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9 | Not specified | CVE List |
| openshift-lightspeed/lightspeed-console-plugin-rhel9 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel9 | Not specified | CVE List |
| openshift-pipelines/pipelines-hub-ui-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-hub-ui-rhel9 | Not specified | CVE List |
| openshift-service-mesh/kiali-operator-bundle | Not specified | CVE List |
| openshift-service-mesh/kiali-rhel9-operator | Not specified | CVE List |
| 3scale-amp21/system | Not specified | CVE List |
| 3scale-amp22/system | Not specified | CVE List |
| 3scale-amp2/system-rhel7 | Not specified | CVE List |
| 3scale-amp2/system-rhel8 | Not specified | CVE List |
| 3scale-amp2/system-rhel9 | Not specified | CVE List |
| ansible-automation-platform-26/gateway-rhel9 | Not specified | CVE List |
| ansible-automation-platform-26/lightspeed-rhel9 | Not specified | CVE List |
| ansible-automation-platform/automation-dashboard-rhel9 | Not specified | CVE List |
| automation-controller | Not specified | CVE List |
| automation-eda-controller | Not specified | CVE List |
| automation-gateway | Not specified | CVE List |
| automation-hub | Not specified | CVE List |
| automation-platform-ui | Not specified | CVE List |
| python3.11-galaxy-ng | Not specified | CVE List |
| python3.12-galaxy-ng | Not specified | CVE List |
| python3x-galaxy-ng | Not specified | CVE List |
| python-galaxy-ng | Not specified | CVE List |
| apicurio/apicurio-registry-ui-rhel8 | Not specified | CVE List |
| apicurio/apicurio-registry-ui-rhel9 | Not specified | CVE List |
| rh-podman-desktop.git | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-openshift-local-rhel10 | Not specified | CVE List |
| rhceph/alloy-rhel10 | Not specified | CVE List |
| rhcl-1/rhcl-console-plugin-rhel9 | Not specified | CVE List |
| rhdh/backstage-community-plugin-catalog-backend-module-scaffolder-relation-processor | Not specified | CVE List |
| rhem/flightctl-ui-ocp-rhel10 | Not specified | CVE List |
| rhem/flightctl-ui-ocp-rhel9 | Not specified | CVE List |
| rhem/flightctl-ui-rhel10 | Not specified | CVE List |
| rhem/flightctl-ui-rhel9 | Not specified | CVE List |
| grafana | Not specified | CVE List |
| pcs | Not specified | CVE List |
| rhelai3/bootc-cuda-rhel9 | Not specified | CVE List |
| rhelai3/bootc-rocm-rhel9 | Not specified | CVE List |
| rhelai3/disk-image-cuda-rhel9 | Not specified | CVE List |
| boost | Not specified | CVE List |
| dotnet8.0 | Not specified | CVE List |
| python3.14 | Not specified | CVE List |
| rhoai/odh-dashboard-rhel8 | Not specified | CVE List |
| rhoai/odh-mlflow-rhel9 | Not specified | CVE List |
| rhoai/odh-mod-arch-maas-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-datascience-cpu-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-minimal-cpu-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-pytorch-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-pytorch-rocm-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-tensorflow-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-tensorflow-rocm-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-minimal-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-minimal-rocm-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9 | Not specified | CVE List |
| openshift3/ose-console | Not specified | CVE List |
| openshift4/nmstate-console-plugin-rhel9 | Not specified | CVE List |
| openshift4/ose-agent-installer-ui-rhel9 | Not specified | CVE List |
| openshift4/ose-console | Not specified | CVE List |
| openshift4/ose-networking-console-plugin-rhel9 | Not specified | CVE List |
| odf4/ocs-client-console-rhel9 | Not specified | CVE List |
| odf4/odf-console-rhel9 | Not specified | CVE List |
| odf4/odf-multicluster-console-rhel9 | Not specified | CVE List |
| rhosdt/tempo-jaeger-query-rhel9 | Not specified | CVE List |
| openshift-gitops-1/console-plugin-rhel8 | Not specified | CVE List |
| openshift-gitops-1/console-plugin-rhel9 | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin-rhel9 | Not specified | CVE List |
| satellite/iop-advisor-frontend-rhel9 | Not specified | CVE List |
| satellite/iop-host-inventory-frontend-rhel9 | Not specified | CVE List |
| satellite/iop-vulnerability-frontend-rhel9 | Not specified | CVE List |
| rhtas/rhtas-console-ui-rhel9 | Not specified | CVE List |
| rhtpa/rhtpa-trustification-service-rhel9 | Not specified | CVE List |
| ansible-automation-platform/automation-portal | Not specified | CVE List |
| follow-redirects (npm) | before 1.16.0 | GitHub Advisory Database |
| follow-redirects_project follow-redirects | before 1.16.0 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
follow-redirects is an open source, drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. Prior to 1.16.0, when an HTTP request follows a cross-domain redirect (301/302/307/308), follow-redirects only strips authorization, proxy-authorization, and cookie headers (matched by regex at index.js). Any custom authentication header (e.g., X-API-Key, X-Auth-Token, Api-Key, Token) is forwarded verbatim to the redirect target. This vulnerability is fixed in 1.16.0.
GitHub Advisory Database
Summary
When an HTTP request follows a cross-domain redirect (301/302/307/308), follow-redirects only strips authorization, proxy-authorization, and cookie headers (matched by regex at index.js:469-476). Any custom authentication header (e.g., X-API-Key, X-Auth-Token, Api-Key, Token) is forwarded verbatim to the redirect target.
Since follow-redirects is the redirect-handling dependency for axios (105K+ stars), this vulnerability affects the entire axios ecosystem.
Affected Code
index.js, lines 469-476:
if (redirectUrl.protocol !== currentUrlParts.protocol &&
redirectUrl.protocol !== "https:" ||
redirectUrl.host !== currentHost &&
!isSubdomain(redirectUrl.host, currentHost)) {
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
}
The regex only matches authorization, proxy-authorization, and cookie. Custom headers like X-API-Key are not matched.
Attack Scenario
- App uses axios with custom auth header:
headers: { 'X-API-Key': 'sk-live-secret123' } - Server returns
302 Location: https://evil.com/steal - follow-redirects sends
X-API-Key: sk-live-secret123toevil.com - Attacker captures the API key
Impact
Any custom auth header set via axios leaks on cross-domain redirect. Extremely common pattern. Affects all axios users in Node.js.
Suggested Fix
Add a sensitiveHeaders option that users can extend, or strip ALL non-standard headers on cross-domain redirect.
Disclosure
Source code review, manually verified. Found 2026-03-20.
NVD (es)
follow-redirects es un reemplazo directo de código abierto para los módulos ’http’ y ’https’ de Node que sigue automáticamente las redirecciones. Antes de la versión 1.16.0, cuando una solicitud HTTP sigue una redirección entre dominios (301/302/307/308), follow-redirects solo elimina los encabezados de autorización, proxy-authorization y cookie (coincidencia por regex en index.js). Cualquier encabezado de autenticación personalizado (por ejemplo, X-API-Key, X-Auth-Token, Api-Key, Token) se reenvía textualmente al destino de la redirección. Esta vulnerabilidad está corregida en la versión 1.16.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40895 changed 2026-11-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r4q5-vmmm-2653 changed 2026-11-02 | CC-BY-4.0 |
| NVD | CVE-2026-40895 changed 2026-11-11 | Public domain |