Resource exhaustion in Ericcornelissen Shescape
CVE-2022-36064
Shescape is a shell escape package for JavaScript. An Inefficient Regular Expression Complexity vulnerability impacts users that use Shescape to escape arguments for the Unix shells `Bash` and `Dash`, or any not-officially-supported Unix shell; and/or using the `escape` or `escapeAll` functions with the `interpolation` option set to `true`. An attacker can cause polynomial backtracking or quadratic runtime in terms of the input string length due to two Regular Expressions in Shescape that are vulnerable to Regular Expression Denial of Service (ReDoS). This bug has been patched in v1.5.10. For `Dash` only, this bug has been patched since v1.5.9. As a workaround, a maximum length can be enforced on input strings to Shescape to reduce the impact of the vulnerability. It is not recommended to try and detect vulnerable input strings, as the logic for this may end up being vulnerable to ReDoS itself.
Vulnerability class: DoS (Denial of Service)
EPSS: 0.014 (70.5th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 5.9 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
Affected products
- Ericcornelissen Shescape — versions >= 1.5.1, < 1.5.10
- Shescape_project Shescape
Weakness classification (CWE)
Public proof-of-concept exploits
References
- security-advisories@github.com (x_refsource_CONFIRM, Exploit, Third Party Advisory, Mitigation, Issue Tracking)
- security-advisories@github.com (Patch, Third Party Advisory, x_refsource_MISC, Issue Tracking)
- security-advisories@github.com (Third Party Advisory, x_refsource_MISC, Release Notes)
Frequently asked questions
- What is CVE-2022-36064?
- CVE-2022-36064 is a medium-severity vulnerability in Ericcornelissen Shescape, classified under Uncontrolled Resource Consumption. CVSS score: 5.9/10. Published 2022-09-06.
- How severe is CVE-2022-36064?
- Medium severity. CVSS v3 base score is 5.9 out of 10.
- Is CVE-2022-36064 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.