CVE-2022-36064 Shescape Inefficient Regular Expression Complexity vulnerability
Attackers can cause denial of service via inefficient regular expressions in Shescape when escaping arguments for specific shells or using interpolation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-36064?
CVE-2022-36064 is a medium-severity denial of service vulnerability in ericcornelissen shescape, published on 6 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Which versions are affected by CVE-2022-36064?
It affects 1 product.
Products include Shescape Project Shescape.
How do I fix CVE-2022-36064?
No fix has been published for CVE-2022-36064 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2022-36064 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36064 exists.
Other vulnerabilities in ericcornelissen shescape
- CVE-2022-31180 Insufficient escaping of whitespace in shescape
- CVE-2022-31179 Insufficient escaping of line feeds for CMD in shescape
- CVE-2026-32094 Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash
- CVE-2023-40185 Shescape on Windows escaping may be bypassed in threaded context
- CVE-2021-21384 Null characters not escaped in shescape
Sources
Also known as GHSA-gp75-h7j6-5pv3.