CVE-2023-43646 Inefficient Regular Expression Complexity in get-func-name

High 8.6 Published Updated

Attackers can cause denial of service via excessive CPU usage by exploiting inefficient regular expressions in the get-func-name library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-43646?

CVE-2023-43646 is a high-severity denial of service vulnerability in chaijs get-func-name, published on 26 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

get-func-name is a module to retrieve a function's name securely and consistently both in NodeJS and the browser. Versions prior to 2.0.1 are subject to a regular expression denial of service (redos) vulnerability which may lead to a denial of service when parsing malicious input. 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: '\t'.repeat(54773) + '\t/function/i'. This issue has been addressed in commit `f934b228b` which has been included in releases from 2.0.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-400, CWE-1333

Which versions are affected by CVE-2023-43646?

2 open source packages ship an affected version, including get-func-name. It affects 1 product.

PackageAffectedFixed in
get-func-name npmAll versions2.0.1
get-func-name npmAll versions2.0.1

Products include Chaijs Get-Func-Name.

How do I fix CVE-2023-43646?

Upgrade get-func-name to 2.0.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-43646 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-43646 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2023-43646, GHSA-4q6p-r6v2-jvc5, UBUNTU-CVE-2023-43646.

Is CVE-2023-43646 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free