CVE-2023-43646

8.6 HIGH

📋 TL;DR

CVE-2023-43646 is a regular expression denial of service (ReDoS) vulnerability in the get-func-name npm module. It allows attackers to cause denial of service by sending specially crafted input that triggers excessive backtracking in the module's regular expression parser. This affects any application using vulnerable versions of get-func-name to parse function names from user-controlled input.

💻 Affected Systems

Products:
  • get-func-name npm module
Versions: All versions prior to 2.0.1
Operating Systems: All platforms running Node.js or browser environments
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the core module functionality and affects all default configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to CPU exhaustion, potentially affecting all users of the vulnerable application.

🟠

Likely Case

Degraded performance or temporary service disruption for affected endpoints that process malicious input.

🟢

If Mitigated

Minimal impact if input validation or rate limiting prevents malicious payloads from reaching the vulnerable function.

🌐 Internet-Facing: HIGH - Any internet-facing service using get-func-name with user input is vulnerable to DoS attacks.
🏢 Internal Only: MEDIUM - Internal services could be affected by malicious internal users or compromised accounts.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The exact exploit string is publicly documented: '\t'.repeat(54773) + '\t/function/i'. No authentication required to trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.1 and later

Vendor Advisory: https://github.com/chaijs/get-func-name/security/advisories/GHSA-4q6p-r6v2-jvc5

Restart Required: Yes

Instructions:

1. Update package.json to specify get-func-name version 2.0.1 or higher. 2. Run 'npm update get-func-name' or 'yarn upgrade get-func-name'. 3. Restart the application to load the updated module.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation to reject or sanitize inputs containing excessive tabs or unbalanced parentheses before they reach get-func-name.

🧯 If You Can't Patch

  • Implement rate limiting on endpoints that use get-func-name to prevent repeated exploitation attempts.
  • Deploy web application firewalls (WAF) with ReDoS protection rules to block malicious patterns.

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for get-func-name version. If version is below 2.0.1, the system is vulnerable.

Check Version:

npm list get-func-name | grep get-func-name

Verify Fix Applied:

After updating, verify the installed version with 'npm list get-func-name' and confirm it shows 2.0.1 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Unusually high CPU usage spikes
  • Increased processing time for function name parsing operations
  • Application timeouts or crashes

Network Indicators:

  • Multiple requests containing patterns of repeated tabs followed by '/function/i'

SIEM Query:

source="application_logs" AND (message:"CPU spike" OR message:"timeout") AND process:"node"

🔗 References

📤 Share & Export