GHSA-q53c-4prm-w95q
JavaScript Análise e mitigação de vulnerabilidades

Impact

This impacts users of Shescape on Unix systems that explicitly configure shell to Dash, or true when the default shell is Dash, using the escape and escapeAll APIs in assignments prefixed to a command. An attacker may be able to obtain the location of the home directory and, depending on how it is used, change the location on which a command operates in unexpected ways.

import * as cp from "node:child_process";
import { Shescape } from "shescape";
// 1. Prerequisites
const options = {
    shell: "dash",
    // Or
    shell: true, // Only if the default shell is Dash
};
// 2. Payload
const payload = ":~";
// 3. Usage
const shescape = new Shescape(options);
let escapedPayload;
escapedPayload = shescape.escape(payload);
// Or
escapedPayload = shescape.escapeAll([payload]);
// And (example)
const result = cp.execSync(`V=${escapedPayload}; echo $V`, options);
// 4. Impact
console.log(result.toString());
// Outputs ":" followed by the user's home directory

Patches

This bug has been patched in [v2.1.14] and [v3.0.1] which you can upgrade to now. If you are already using v3 of Shescape, no further changes are required. If you are using v2 of Shescape it is recommended to upgrade as this version reaches end-of-life status on 2026-09-28, follow the [migration guide] to upgrade to v3. No patches will be released for version of Shescape lower than v2.0.0.

Workarounds

Alternatively, users of Shescape can 1) refrain from using Dash, 2) use the env option of the node:child_process API to inject variables with untrusted values instead, or 3) remove all instances of ~ from untrusted inputs.

For more information


OrigemNVD

Relacionado JavaScript Vulnerabilidades:

CVE ID

Gravidade

Pontuação

Tecnologias

Nome do componente

Exploração do CISA KEV

Tem correção

Data de publicação

GHSA-w4hw-qcx7-56prCRITICAL9.2
  • JavaScript logoJavaScript
  • shescape
NãoSimJul 24, 2026
GHSA-gm3r-q2wp-hw87HIGH8.7
  • JavaScript logoJavaScript
  • shescape
NãoSimJul 24, 2026
GHSA-q53c-4prm-w95qMEDIUM6.3
  • JavaScript logoJavaScript
  • shescape
NãoSimJul 24, 2026
GHSA-8q49-2h5h-434xMEDIUM5.9
  • JavaScript logoJavaScript
  • @frontmcp/adapters
NãoSimJul 24, 2026
GHSA-3r53-75j5-3g7jMEDIUM5.6
  • JavaScript logoJavaScript
  • quasar
NãoSimJul 24, 2026

Avaliação de vulnerabilidade gratuita

Compare sua postura de segurança na nuvem

Avalie suas práticas de segurança na nuvem em 9 domínios de segurança para comparar seu nível de risco e identificar lacunas em suas defesas.

Solicitar avaliação

Marque uma demonstração personalizada

Pronto para ver a Wiz em ação?

"A melhor experiência do usuário que eu já vi, fornece visibilidade total para cargas de trabalho na nuvem."
David EstlickCISO
"A Wiz fornece um único painel de vidro para ver o que está acontecendo em nossos ambientes de nuvem."
Adam FletcherDiretor de Segurança
"Sabemos que se a Wiz identifica algo como crítico, na verdade é."
Greg PoniatowskiChefe de Gerenciamento de Ameaças e Vulnerabilidades