CVE-2026-102422
Inyección de comandos shell en shell-quote por comentarios no validados
Crítica 9.2 Sin autenticación
Seguir: esta CVE Te avisamos por email o Slack (requiere cuenta).
- Prioridad
- 70
- CVSS 4.0
- 9.2
- EPSS
- —
- Requiere autenticación
- No
- Publicada
- 29 sep 2026
- Actualizada
- 30 sep 2026
- Categoría
- Aplicación · Multiplataforma
- Debilidad (CWE)
- CWE-78
- SSVC (CISA)
- Explotación: ninguna · Automatizable: no · Impacto técnico: total
- Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Qué pasa
La función `quote()` de shell-quote emite tokens de comentario como `#` seguido de texto, lo que comenta el resto de la línea shell. Un salto de línea en una cadena posterior termina el comentario y el resto se ejecuta como entrada shell. Los atacantes pueden ejecutar comandos arbitrarios si combinan `parse()` con cadenas no confiables.
Ver el texto original de NVD (en inglés)
shell-quote's `quote()` function emits a `{ comment }` token as `#` followed by its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator (\n, \r, U+2028, U+2029) in that later string therefore ends the comment, and the rest of the string is parsed as shell input: `quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#'])` runs `id` in sh, bash, dash, ksh and zsh. `parse()` emits a comment token for a `#` in the middle of a word (for example `http://example.com/#frag`), so callers that combine `parse()` output with another untrusted string, such as `quote(parse(untrustedCommand).concat(untrustedArg))`, are affected. The fix for CVE-2026-9277 rejected line terminators in the comment's own text, but not in the tokens after it. Fixed in 1.11.0: `quote()` throws a `TypeError` when a string after a `{ comment }` token contains a line terminator.
Qué hacer
Hay parche · versiones corregidas: 1.11.0
Actualiza shell-quote a la versión 1.11.0 o superior, que rechaza saltos de línea en cadenas después de tokens de comentario.
- Revisa si usas alguno de los productos afectados y sigue el aviso del fabricante.
- Se explota sin autenticación: si no puedes parchear ya, limita el acceso desde Internet al servicio afectado.
Paquetes afectados
| Ecosistema | Paquete | Versiones afectadas | Corregida en | Cómo actualizar |
|---|---|---|---|---|
| npm | shell-quote |
≥ 1.8.4 < 1.11.0 |
1.11.0 |
npm install shell-quote@1.11.0 |
Según OSV / GitHub Advisories (GHSA-pqg4-j6r4-53mv). Verifica la versión en tu lockfile antes de actualizar.
Boletines oficiales
- agama-web-ui-25+723.416bea1dc-57.1 on GA media · SUSE · openSUSE-SU-2026:12701-1 · 27 nov 2026 Crítica
- Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update · Red Hat · RHSA-2026:72498 · 23 nov 2026 Crítica
- Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update · Red Hat · RHSA-2026:72507 · 23 nov 2026 Crítica
- Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update · Red Hat · RHSA-2026:72750 · 10 oct 2026 Crítica
Además: Red Hat (+1)
Avisos de fabricantes, CERT y distribuciones que nombran esta CVE. Títulos sin modificar.
Fuentes oficiales
Referencias
Enlaces publicados por las fuentes. Ábrelos con criterio.