Approved changes feed: RSS · Atom

cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:*:*:*

part: a version: * update: *

VendorShescape Project (dc20cf8b-67ed-54b5-9273-2dbcce7fccc0)
ProductShescape (12a0c7d8-57e2-5fcc-b97a-2d2b29774d90)
Edition*
Language*
Software edition*
Target software*
Target hardware*
Other*

Notes

Imported from purl2cpe mapping

PURL mappings

PURLSourceLast updated
pkg:github/ericcornelissen/shescape purl2cpe 2026-06-01 10:12:02.361266
pkg:npm/shescape purl2cpe 2026-06-01 10:12:02.361268

Vulnerability references

IdentifiercpeApplicabilitySubmitteddb.gcve.eu detailsRationale
CVE:CVE-2022-31180 vulnerable 2026-06-08 05:43:40.341204 Insufficient escaping of whitespace in shescape
CRITICAL (9.8)
Shescape is a simple shell escape package for JavaScript. Affected versions were found to have insufficient escaping of white space when interpolating output. This issue only impacts users that use the `escape` or `escapeAll` functions with the `interpolation` option set to `true`. The result is that if an attacker is able to include whitespace in their input they can: 1. Invoke shell-specific behaviour through shell-specific special characters inserted directly after whitespace. 2. Invoke shell-specific behaviour through shell-specific special characters inserted or appearing after line terminating characters. 3. Invoke arbitrary commands by inserting a line feed character. 4. Invoke arbitrary commands by inserting a carriage return character. Behaviour number 1 has been patched in [v1.5.7] which you can upgrade to now. No further changes are required. Behaviour number 2, 3, and 4 have been patched in [v1.5.8] which you can upgrade to now. No further changes are required. The best workaround is to avoid having to use the `interpolation: true` option - in most cases using an alternative is possible, see [the recipes](https://github.com/ericcornelissen/shescape#recipes) for recommendations. Alternatively, users may strip all whitespace from user input. Note that this is error prone, for example: for PowerShell this requires stripping `'\u0085'` which is not included in JavaScript's definition of `\s` for Regular Expressions.
Published: 2022-08-01T19:15:16.000Z
Updated: 2025-04-22T17:46:22.040Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2022-31179 vulnerable 2026-06-08 05:43:40.340508 Insufficient escaping of line feeds for CMD in shescape
HIGH (8.1)
Shescape is a simple shell escape package for JavaScript. Versions prior to 1.5.8 were found to be subject to code injection on windows. This impacts users that use Shescape (any API function) to escape arguments for cmd.exe on Windows An attacker can omit all arguments following their input by including a line feed character (`'\n'`) in the payload. This bug has been patched in [v1.5.8] which you can upgrade to now. No further changes are required. Alternatively, line feed characters (`'\n'`) can be stripped out manually or the user input can be made the last argument (this only limits the impact).
Published: 2022-08-01T19:20:18.000Z
Updated: 2025-04-22T17:46:08.799Z
Reference links
Imported from gcve-enriched-dumps CVE data

Contribute

You can submit an edit proposal for this CPE entry or suggest a related product/vendor addition using the action button above.

Inspect record JSON

Open JSON directly

Open this panel to browse, search, copy or download the JSON record.