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
Description
Published to the GitHub Advisory Database
Jul 24, 2018
Reviewed
Jun 16, 2020
Last updated
Sep 12, 2023
Affected versions of
string
are vulnerable to regular expression denial of service when specifically crafted untrusted user input is passed into theunderscore
orunescapeHTML
methods.Recommendation
There is currently no direct patch for this vulnerability.
Currently, the best solution is to avoid passing user input to the
underscore
andunescapeHTML
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