개요
이 취약점이 무엇인지
shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`. The `.op` field was backslash-escaped character by character using `/(.)/g`, which in JavaScript does not match line terminators (\n, \r, U+2028, U+2029). A line terminator in `.op` therefore passed through unescaped into the output; POSIX shells treat a literal newline as a command separator, so any content after it would execute as a second command. The vulnerable code path is reachable in two ways: (1) direct construction of `{ op: '...\n...' }` from external input, and (2) via `parse(cmd, envFn)` when `envFn` returns object tokens whose `.op` is attacker-influenced. Both are documented API surface. Fixed by replacing the per-character escape with strict shape validation: `.op` must match the parser's control-operator allowlist; `{ op: 'glob', pattern }` validates `pattern` and forbids line terminators; `{ comment }` validates `comment` and forbids line terminators; any other object shape throws `TypeError`.
실제 악용 사례 · 아직 확인된 사례가 없어요
CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.
패치 현황
어떤 버전이 위험하고, 몇 버전으로 올리면 되는지
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| shell-quote | 1.1.0 | ≤ | 취약 | < | 1.8.4 | 1.8.4이상 |
할당 기관(CNA) 레코드 기준 (NVD 분석 전). 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.
참고 링크
NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.
기타39
- github.com/ljharb/shell-quote
- github.com/ljharb/shell-quote/commit/1518179
- github.com/ljharb/shell-quote/security/advisories/GHSA-w7jw-789q-3m8p
- npmjs.com/package/shell-quote
- openwall.com/lists/oss-security/2026/05/23/2
34개 더 보기
- access.redhat.com/errata/RHSA-2026:26072
- access.redhat.com/errata/RHSA-2026:26077
- access.redhat.com/errata/RHSA-2026:26079
- access.redhat.com/errata/RHSA-2026:26080
- access.redhat.com/errata/RHSA-2026:26090
- access.redhat.com/errata/RHSA-2026:26225
- access.redhat.com/errata/RHSA-2026:28010
- access.redhat.com/errata/RHSA-2026:28571
- access.redhat.com/errata/RHSA-2026:29197
- access.redhat.com/errata/RHSA-2026:29795
- access.redhat.com/errata/RHSA-2026:29834
- access.redhat.com/errata/RHSA-2026:30076
- access.redhat.com/errata/RHSA-2026:33574
- access.redhat.com/errata/RHSA-2026:33683
- access.redhat.com/errata/RHSA-2026:34342
- access.redhat.com/errata/RHSA-2026:34791
- access.redhat.com/errata/RHSA-2026:36754
- access.redhat.com/errata/RHSA-2026:40765
- access.redhat.com/errata/RHSA-2026:41066
- access.redhat.com/errata/RHSA-2026:41928
- access.redhat.com/errata/RHSA-2026:42796
- access.redhat.com/errata/RHSA-2026:44237
- access.redhat.com/errata/RHSA-2026:44263
- access.redhat.com/errata/RHSA-2026:44267
- access.redhat.com/errata/RHSA-2026:48699
- access.redhat.com/errata/RHSA-2026:50850
- access.redhat.com/errata/RHSA-2026:56854
- access.redhat.com/errata/RHSA-2026:56912
- access.redhat.com/errata/RHSA-2026:60023
- access.redhat.com/errata/RHSA-2026:62260
- access.redhat.com/errata/RHSA-2026:62410
- access.redhat.com/security/cve/CVE-2026-9277
- bugzilla.redhat.com/show_bug.cgi?id=2480741
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json