Incorrect Regular Expression Affecting follow-redirects package, versions >=1.16.0 <1.16.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.44% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Regular Expression vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FOLLOWREDIRECTS-21249784
  • published20 Oct 2026
  • disclosed30 Sept 2026
  • creditMohsin Mukhtiar Lashari

Introduced: 30 Sep 2026

NewCVE-2026-111755  (opens in a new tab)
CWE-185  (opens in a new tab)

How to fix?

Upgrade follow-redirects to version 1.16.1 or higher.

Overview

Affected versions of this package are vulnerable to Incorrect Regular Expression in the escapeRegex function in index.js, which escapes ], \, /, (, ), *, +, ?, ., and $ but leaves ^, |, [, {, and } intact, and whose output is joined into the alternation that the RedirectableRequest constructor compiles into this._headerFilter. An attacker can receive a custom credential header that the application declared through sensitiveHeaders by drawing the request into a cross-origin redirect to a host they control, because a declared name holding ^, such as X-Api^Key, gains a mid-pattern start-of-string anchor and can never match, while one holding |, such as X-Token|Secret, splits into the separate alternatives X-Token and Secret, so the real header is forwarded and unrelated headers by those names are stripped instead. Only ^ and | are reachable in practice, since Node rejects [, {, and } in header names with ERR_INVALID_HTTP_TOKEN and declaring one of them instead throws a SyntaxError from the constructor, and the built-in Authorization, Proxy-Authorization, and Cookie entries contain no metacharacters, so the failure is confined to applications that declare their own names and silently lose the protection they configured.

CVSS Base Scores

version 4.0
version 3.1