Security mailing lists by PureSourceCode

CVE-2022-31179

CRITICAL 9.8CVSS 3.1

Shescape prior to 1.5.8 vulnerable to insufficient escaping of line feeds for CMD

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
1 Aug 2022
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-74
Also known as
GHSA-jjc5-fp7p-6f8w
Sources
NVDJSONOSV GHSA-jjc5-fp7p-6f8wJSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:H
OSV GitHub CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD shescape_project shescape
cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:*:*:*
< 1.5.8 1.5.8
OSV npm shescape < 1.5.8 1.5.8

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 1 Aug 2022)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 15 Jul 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.