CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
CHANGED
Confidentiality Impact
NONE
Integrity Impact
NONE
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H
AI Score
Confidence
High
EPSS
Percentile
20.5%
get-func-name is vulnerable to Regular Expression Denial Of Service. The vulnerability is due to the getFuncName
function in index.js
not properly checking the functionSource
size and length. which allows an attacker to trigger a DOS attack by using an input like '\t'.repeat(54773) + '\t/function/i',
which exploits the regular expressionโs weakness in functionNameMatch
to create excessive backtracking.
github.com/chaijs/get-func-name/commit/f934b228b5e2cb94d6c8576d3aac05493f667c69
github.com/chaijs/get-func-name/security/advisories/GHSA-4q6p-r6v2-jvc5
github.com/chaijs/get-func-name/security/advisories/GHSA-4q6p-r6v2-jvc5#:~:text=Here%20is%20a%20simple%20PoC%20code%20to%20demonstrate%20the%20issue%3A