Skip to content

Regular Expression Denial of Service in underscore.string

Moderate severity GitHub Reviewed Published Jun 14, 2019 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm underscore.string (npm)

Affected versions

< 3.3.5

Patched versions

3.3.5

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.

References

Reviewed Jun 14, 2019
Published to the GitHub Advisory Database Jun 14, 2019
Last updated Jan 9, 2023

Severity

Moderate

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-v2p6-4mp7-3r9v

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.