CVE-2022-37262: StealJS ReDoS in main.js source variables

CVE-2022-37262 · Severity: low · CVSS 3.1 · Published 2022-09-16

StealJS, a popular JavaScript dependency loader, is vulnerable to a denial-of-service attack. An attacker can provide specially crafted input that causes the software to consume excessive processing power, potentially crashing the application or making it unresponsive to legitimate users. This impact can disrupt web services and business operations that rely on this library for loading code.

Technologies: steal (npm). Vendors: npm.

Quick answers

Is CVE-2022-37262 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-37262 being exploited in the wild.
How severe is CVE-2022-37262?
Low severity, with a CVSS score of 3.1, published 16 September 2022.
Which products and versions are affected?
steal (npm) SEMVER:introduced=0,last_affected=2.3.0; StealJS <= 2.3.0.
Is there a fix for CVE-2022-37262?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2022-37262 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2022-37262?
Check whether you run steal (npm) or StealJS at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A Regular Expression Denial of Service (ReDoS) vulnerability exists in StealJS versions up to and including 2.3.0. The flaw is located within the 'source' and 'sourceWithComments' variables in 'main.js', where inefficient regular expressions can be triggered by malicious input. An unauthenticated remote attacker can exploit this by providing a crafted string that causes catastrophic backtracking during regex evaluation. This leads to high CPU utilization and a denial-of-service condition. As of the advisory publication, users are advised to review their use of the library and check for updates from the maintainers.

Affected products

  • stealjs steal <= 2.3.0

Identifiers

  • CVE-2022-37262
  • GHSA-28v4-jf82-jvj8

Timeline

  • 2022-09-14: disclosed: Issue reported on GitHub repository
  • 2022-09-15: advisory: NVD published CVE-2022-37262
  • 2022-09-16: advisory: GitHub Advisory published GHSA-28v4-jf82-jvj8

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.