Vulnerability library
Security checkJanuary 09, 2023

Regular Expression Denial of Service in underscore.string

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmunderscore.string

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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

Update the underscore.string package to the latest compatible version. Followings are version details:

  • Affected version(s): < 3.3.5
  • Patched version(s): 3.3.5

References

Could your website be exposed too?

SmartScanner can check your website for Regular Expression Denial of Service in underscore.string and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated January 09, 2023