Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-9277— shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`

CVSS 8.1 · High EPSS 0.85% · P55

Affected Version Matrix 1

VendorProductVersion RangeStatus
Noneshell-quote1.1.0< 1.8.4affected
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-9277

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`
Source: CVE Program / CVE List V5
Vulnerability Description
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`.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
OS命令中使用的特殊元素转义处理不恰当(OS命令注入)
Source: CVE Program / CVE List V5
Vulnerability Title
shell-quote 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
shell-quote是Jordan Harband个人开发者的一个软件包。用于解析和引用 shell 命令。 shell-quote存在安全漏洞,该漏洞源于quote函数未验证对象令牌输入与parse使用的运算符模型,导致换行符等行终止符未转义,可能被POSIX shell解释为命令分隔符,从而执行后续内容。以下版本受到影响:shell-quote。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
-shell-quote 1.1.0 ~ 1.8.4 -

II. Public POCs for CVE-2026-9277

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium
Qwen3.6-35B-A3B · 10365 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-9277

登录查看更多情报信息。

Patches & Fixes for CVE-2026-9277 (1)

Vendor Advisories for CVE-2026-9277 (1)

Other References for CVE-2026-9277 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-9277

No comments yet


Leave a comment