High, CVSS 7.5npmAmendedPublished
Chaijs/get-func-name vulnerable to ReDoS
CVE-2023-43646 · GHSA-4q6p-r6v2-jvc5
- Affected
- npm get-func-name < 2.0.1
- Fixed in
- 2.0.1· Vendor fix available
- Issue
- The current regex implementation for parsing values in the module is susceptible to excessive backtracking, leading to potential DoS attacks. The regex implementation in question is as follows: This vulnerability can be exploited when there is an imbalance in parentheses, which results in excessive backtracking and subsequently increases the CPU load and processing time significantly. This vulnerability can be triggered using the following input: Here is a simple PoC code to demonstrate the issue:
Recommended action: Upgrade to 2.0.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.