Skip to main content
Public proof of conceptFix available

CVE-2026-9277

A public proof of concept exists; no exploitation attested.

  • Published2026-05-22
  • Fixed in1.8.4
  • WeaknessCWE-77 · CWE-78

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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`.

Timeline

dates in UTC
  1. 2026-05-2214:16CVE publishedNVD
  2. 2026-10-2319:23First public proof of conceptPoC-in-GitHub

Versions per branch

OSV
shell-quote
BranchAffectedFixed in
1.x≥ 1.1.0, < 1.8.41.8.4

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As harborist, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-05-22

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.6.3-root.io.4
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.8.1-root.io.2
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.6.3-root.io.3
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.7.2-root.io.1
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.7.2-root.io.2
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.7.3-root.io.1
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.7.3-root.io.2
  • @rootio/shell-quoteRoot:npmall versions · fixed in 1.8.0-root.io.1

79 more package ranges on OSV.dev

Vendor advisories

  • CVE-2026-9277 Red Hat Product Security169 products fixed · 21 known affected

    shell-quote: shell-quote: Arbitrary code execution via command injection due to unescaped line terminators

    openshift-lightspeed/lightspeed-console-plugin-419-rhel9 as a component of OpenShift Lightspeed · openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9 as a component of OpenShift Lightspeed · openshift-lightspeed/lightspeed-console-plugin-rhel9 as a component of OpenShift Lightspeed · +18 more

  • RHSA-2026:93951 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: OpenShift Virtualization v4.17 Images

  • RHSA-2026:70647 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.12.99 bug fix and security update

  • RHSA-2026:70267 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Quay 3.14.9

  • RHSA-2026:65840 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.13.71 bug fix and security update

  • RHSA-2026:62410 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.14.73 bug fix and security update

31 more advisories

Full record on NVD

Fix

  1. Update shell-quote to 1.8.4
  2. Vendor fix Red Hat Product Security RHSA-2026:93951 · 2 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Red Hat Product Security RHSA-2026:70647 · 1 productFor OpenShift Container Platform 4.12 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
  4. Vendor fix Red Hat Product Security RHSA-2026:70267 · 4 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11458
  5. Vendor fix Red Hat Product Security RHSA-2026:65840 · 1 productFor OpenShift Container Platform 4.13 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
  6. Vendor fix Red Hat Product Security RHSA-2026:62410 · 4 productsFor OpenShift Container Platform 4.14 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
  7. Vendor fix Red Hat Product Security RHSA-2026:60023 · 4 productsFor OpenShift Container Platform 4.17 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • NVDCVE recordread 2026-10-23
  • CISA-ADPSSVC decisionnone2026-05-22
  • CNACVSS 4.09.2known since 2026-10-23
  • CNACVSS 3.18.1known since 2026-10-23
  • CNAweakness (CWE)CWE-77, CWE-78known since 2026-10-23
  • FIRST EPSSEPSS score1.7 %2026-11-25
  • PoC-in-GitHubproof of concept1known since 2026-11-01
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryCritical2026-06-09

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 4.0 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
Published
2026-05-22
Last modified
2026-09-14
NVD status
Deferred
GitHub advisory
GHSA-w7jw-789q-3m8p

Frequently asked questions

What is CVE-2026-9277?

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`.

Is CVE-2026-9277 actively exploited?

Active exploitation of CVE-2026-9277 has not been confirmed. Its EPSS score was 1.7% on 2026-11-25, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-9277?

CVE-2026-9277 has a CVSS v3 base score of 8.1 (High severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running shell-quote? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record