Skip to content

Regular Expression Denial of Service in string package

High severity GitHub Reviewed Published Jul 24, 2018 to the GitHub Advisory Database • Updated Sep 12, 2023

Package

npm string (npm)

Affected versions

<= 3.3.3

Patched versions

None

Description

Affected versions of string are vulnerable to regular expression denial of service when specifically crafted untrusted user input is passed into the underscore or unescapeHTML methods.

Recommendation

There is currently no direct patch for this vulnerability.

Currently, the best solution is to avoid passing user input to the underscore and unescapeHTML methods.

Alternatively, a user provided patch is available in Pull Request #217, however this patch has not been tested, nor has it been merged by the package author.

References

Published to the GitHub Advisory Database Jul 24, 2018
Reviewed Jun 16, 2020
Last updated Sep 12, 2023

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2017-16116

GHSA ID

GHSA-g36h-6r4f-3mqp

Source code

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