Follow-redirects
follow-redirects sensitiveHeaders regex escaping can expose credential headers
follow-redirects is a Node.js HTTP and HTTPS client wrapper that automatically follows redirects. From 1.16.0 until 1.16.1, escapeRegex leaves valid header-name metacharacters unescaped in sensitiveHeaders. When an application declares a sensitive header whose name contains ^ or | and follows a cross-origin or HTTPS-to-HTTP redirect, unescaped regular-expression metacharacters prevent the generated filter from matching the declared header name, and the credential header is forwarded to an attacker-controlled redirect target. This issue is fixed in version 1.16.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.16.0, < 1.16.1
Fixed in 1.16.1
Mitigation
Upgrade follow-redirects to 1.16.1 or later.
References
- Vendor advisory github.com/follow-redirects/follow-redirects/s…
- Patch github.com/follow-redirects/follow-redirects/c…
- Release notes github.com/follow-redirects/follow-redirects/r…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.