Live threats

All CVEs / Shescape Project

CVE-2022-31179Shescape Project Shescape

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
1.4%
probability of exploitation in 30 days · percentile 72
Auth required
No
Published
Aug 1, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-74
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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).

Original NVD text.

What to do

  1. Apply the vendor's security update for Shescape.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm shescape < 1.5.8 1.5.8 npm install shescape@1.5.8

Per OSV / GitHub Advisories (GHSA-jjc5-fp7p-6f8w). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
shescape_projectshescape< 1.5.8

Official sources

References

Links published by the sources. Open them with care.