GHSA-v2p6-4mp7-3r9v Regular Expression Denial of Service in underscore.string

Not scored Published

An attacker can cause a denial of service in applications using underscore.string by submitting specially crafted input to the unescapeHTML function.

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

What is GHSA-v2p6-4mp7-3r9v?

GHSA-v2p6-4mp7-3r9v is a denial of service vulnerability in underscore.string, published on 14 Jun 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of underscore.string prior to 3.3.5 are vulnerable to Regular Expression Denial of Service (ReDoS).

The function unescapeHTML is vulnerable to ReDoS due to an overly-broad regex. The slowdown is approximately 2s for 50,000 characters but grows exponentially with larger inputs.

Recommendation

Upgrade to version 3.3.5 or higher.

Which versions are affected by GHSA-v2p6-4mp7-3r9v?

2 open source packages ship an affected version, including underscore.string.

PackageAffectedFixed in
underscore.string npmAll versions3.3.5
underscore.string npmAll versions3.3.5

How do I fix GHSA-v2p6-4mp7-3r9v?

Upgrade underscore.string to 3.3.5 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 GHSA-v2p6-4mp7-3r9v being exploited?

There is no known exploitation of GHSA-v2p6-4mp7-3r9v in the wild and no public exploit code.

Sources

Is GHSA-v2p6-4mp7-3r9v in your software?

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

Check your SBOMs for free