GitHub Advisoryadvisory · npm

GHSA-vp56-6g26-6827 node-fetch Inefficient Regular Expression Complexity

MEDIUM Published 2022-08-02 Modified 2022-08-04 Official page ↗
Aliases
CVE-2022-2596
Ecosystem
npm
Packages
node-fetch
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-1333, CWE-400
Reviewed
2022-08-04

Affected packages

• npm node-fetch: >= 3.0.0, < 3.2.10 → fixed in 3.2.10

Description

node-fetch is a light-weight module that brings window.fetch to node.js. Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the `isOriginPotentiallyTrustworthy()` function in `referrer.js`, when processing a URL string with alternating letters and periods, such as `'http://' + 'a.a.'.repeat(i) + 'a'`.

Related

Alias · CVE (1)

  • CVE-2022-2596 Inefficient Regular Expression Complexity in GitHub repository node-fetch/node-fetch prior to 3.2.10. vulnerability

Weakness · CWE (2)

  • CWE-1333 Inefficient Regular Expression Complexity weakness
  • CWE-400 Uncontrolled Resource Consumption weakness

References