Home / shell-quote / shell-quote / CVE-2026-9277
CVE-2026-9277: is it exploited, and which versions of shell-quote are affected and fixed?
CVE-2026-9277 is an OS command injection vulnerability in shell-quote. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:08 UTC). Affected: shell-quote from 1.1.0 before 1.8.4 (GitHub advisory GHSA-w7jw-789q-3m8p). Fixed in 1.8.4 (GitHub advisory GHSA-w7jw-789q-3m8p). Severity: Critical (9.2, CVSS 3.1, from harborist).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:08 UTC, CVE record November 19, 2026, 07:08 UTC and NVD November 19, 2026, 07:11 UTC.
What is CVE-2026-9277?
shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`
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`.
From the CVE record by harborist, last updated September 14, 2026, 12:04 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| shell-quote | from 1.1.0 before 1.8.4 | 1.8.4 |
As the CVE record by harborist states it, last updated September 14, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | shell-quote | >= 1.1.0, < 1.8.4 | 1.8.4 | GHSA-w7jw-789q-3m8p |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated June 9, 2026. Summary: shell-quote quote() does not escape newlines in object .op values.
How severe is CVE-2026-9277?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | harborist |
| Critical 9.2 | CVSS 4.0 | 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 | harborist |
| High 8.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | redhat-SADP |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-9277 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, May 22, 2026)
- EPSS
- 1.42% probability of exploitation activity in the next 30 days, percentile 73.6 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
- CWE-77 Improper Neutralization of Special Elements used in a Command
Where are the vendor advisories and references?
- GHSA-w7jw-789q-3m8p vendor-advisory
- Fix commit patch
- https://github.com/ljharb/shell-quote product
- https://www.npmjs.com/package/shell-quote product
- http://www.openwall.com/lists/oss-security/2026/05/23/2
- https://access.redhat.com/security/cve/CVE-2026-9277 vdb-entry, x_refsource_REDHAT
- RHBZ#2480741 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:28010 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:34342 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:50850 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:36754 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:33574 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:29197 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:41928 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:62410 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:56912 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:56854 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:60023 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:48699 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:40765 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:44263 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:34791 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:44267 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:29834 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:44237 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:29795 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:62260 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26072 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26080 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26077 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26079 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26090 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:33683 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:30076 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:42796 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:41066 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:28571 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:26225 vendor-advisory, x_refsource_REDHAT
Who found and reported it?
- Akshat Sinha (@akshatgit) (finder)
- Jordan Harband (@ljharb) (remediation developer)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- May 22, 2026
- Published
- May 22, 2026, 13:22 UTC
- CVE record updated
- September 14, 2026, 12:04 UTC by harborist
- NVD
- Deferred, last modified September 14, 2026, 13:19 UTC
- Last checked
- CVE list November 19, 2026, 07:08 UTC; NVD November 19, 2026, 07:11 UTC; KEV December 3, 2026, 11:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect shell-quote?
- Sep 29, 2026CVE-2026-102422 shell-quote: OS command injection
Questions about CVE-2026-9277
Is CVE-2026-9277 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:08 UTC. FIRST's EPSS gives it a 1.42% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of shell-quote are affected by CVE-2026-9277?
shell-quote from 1.1.0 before 1.8.4, per the GitHub advisory GHSA-w7jw-789q-3m8p. The tables above give every range the sources list.
Which version fixes CVE-2026-9277?
1.8.4, per the GitHub advisory GHSA-w7jw-789q-3m8p. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-9277?
Critical (9.2, CVSS 3.1, from harborist). The severity table above shows each score with its source.
Where is the official record of CVE-2026-9277?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.