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

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-06-14T16:26:22.000Z
- Modified: 2020-08-31T18:34:16.000Z
- Weaknesses: CWE-400

## 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.

(As written by GitHub Advisory Database.)

## Affected

- underscore.string (npm): before 3.3.5

## References

- <https://github.com/epeli/underscore.string/issues/510> (web)
- <https://github.com/epeli/underscore.string/pull/517> (web)
- <https://github.com/epeli/underscore.string/commit/f486cd684c94c12db48b45d52b1472a1b9661029> (web)
- <https://www.npmjs.com/advisories/745> (web)

## Sources

- GitHub Advisory Database: [GHSA-v2p6-4mp7-3r9v](https://github.com/advisories/GHSA-v2p6-4mp7-3r9v), CC-BY-4.0, modified 2020-08-31

---

Page: https://cve.day/GHSA-v2p6-4mp7-3r9v · Whole record: https://cve.day/GHSA-v2p6-4mp7-3r9v.json · Rebuilt by cve.day 2026-11-25T22:56:46.551Z
