---
title: "GHSA-cxjh-pqwp-8mfp: follow-redirects' Proxy-Authorization header kept across hosts"
description: "Moderate severity. follow-redirects' Proxy-Authorization header kept across hosts. Affects follow-redirects; fixed in 1.15.6."
url: https://inlinr.com/advisories/GHSA-cxjh-pqwp-8mfp
lang: en
---

[Packages](https://inlinr.com/packages) / [follow-redirects](https://inlinr.com/packages/follow-redirects) / [Security](https://inlinr.com/packages/follow-redirects/security)

Moderate Vulnerability GHSA-cxjh-pqwp-8mfp CVE-2024-28849 Published 14 Mar 2024

# follow-redirects' Proxy-Authorization header kept across hosts

Your version 

Affected releases · [follow-redirects](https://inlinr.com/packages/follow-redirects)

- 1.x 1.0.0 – 1.15.5 Fixed in 1.15.6
- 0.3.x and older 0.0.1 – 0.3.0 No fix, no longer updated

On 1.x, the newest line:

```
npm install follow-redirects@1.15.6
```

Every release on a timeline

1.x 

1. Affected

1.0.0 – 1.15.5  
54 releases
2. Fixed

1.15.6 – 1.16.3  
10 releases, latest

0.x 

1. Affected

0.0.1 – 0.3.0  
10 releases

74 stable releases of follow-redirects, oldest to newest, one row per major.

## What happens

When using [axios](https://github.com/axios/axios "https://github.com/axios/axios"), its dependency follow-redirects only clears authorization header during cross-domain redirect, but allows the proxy-authentication header which contains credentials too.

Steps To Reproduce & PoC

Test code:

```
const axios = require('axios');

axios.get('http://127.0.0.1:10081/', {
 headers: {
 'AuThorization': 'Rear Test',
 'ProXy-AuthoriZation': 'Rear Test',
 'coOkie': 't=1'
 }
})
 .then((response) => {
 console.log(response);
 })
```

When I meet the cross-domain redirect, the sensitive headers like authorization and cookie are cleared, but proxy-authentication header is kept.

Impact

This vulnerability may lead to credentials leak.

Recommendations

Remove proxy-authentication header during cross-domain redirect

Recommended Patch

[follow-redirects/index.js:464](https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b "https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b")

```
- removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
+ removeMatchingHeaders(/^(?:authorization|proxy-authorization|cookie)$/i, this._options.headers);
```

## How it is exploited

Exploitable over the network, with a low-privilege account and no action from a user.

- **Confidentiality**: high
- **Integrity**: none
- **Availability**: none

CVSS:3.1/​AV:N/​AC:L/​PR:L/​UI:N/​S:U/​C:H/​I:N/​A:N

## References

- [Reference](https://github.com/follow-redirects/follow-redirects/security/advisories/GHSA-cxjh-pqwp-8mfp "https://github.com/follow-redirects/follow-redirects/security/advisories/GHSA-cxjh-pqwp-8mfp")  
github.com/follow-redirects/follow-redirects/se…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-28849 "https://nvd.nist.gov/vuln/detail/CVE-2024-28849")  
nvd.nist.gov/vuln/detail/CVE-2024-28849
- [Issue](https://github.com/psf/requests/issues/1885 "https://github.com/psf/requests/issues/1885")  
#1885
- [Fix commit](https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b "https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b")  
c4f847f
- [Reference](https://hackerone.com/reports/2390009 "https://hackerone.com/reports/2390009")  
hackerone.com/reports/2390009
- [Reference](https://fetch.spec.whatwg.org/#authentication-entries "https://fetch.spec.whatwg.org/#authentication-entries")  
fetch.spec.whatwg.org
- [Package](https://github.com/follow-redirects/follow-redirects "https://github.com/follow-redirects/follow-redirects")  
github.com/follow-redirects/follow-redirects
- [Reference](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOIF4EPQUCKDBEVTGRQDZ3CGTYQHPO7Z "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOIF4EPQUCKDBEVTGRQDZ3CGTYQHPO7Z")  
lists.fedoraproject.org/archives/list/package-a…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
