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

- Severity: Critical 9.2 (CVSS:4.0, scored by harborist) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.42%, higher than 73% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-22T13:22:38.873Z
- Modified: 2026-09-14T13:19:33.133Z
- Also known as: GHSA-w7jw-789q-3m8p
- Weaknesses: CWE-77, CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: harborist

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

(As written by CVE List.)

## Affected

- shell-quote: from 1.1.0 before 1.8.4
- cryostat/cryostat-openshift-console-plugin-rhel9: no versions given (not affected: from 4.2.0-10 before *)
- cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9: no versions given (not affected: from 1782840519 before *)
- cluster-observability-operator/distributed-tracing-console-plugin-pf5-rhel9: no versions given (not affected: from 1782839981 before *)
- cluster-observability-operator/distributed-tracing-console-plugin-pf6-rhel9: no versions given (not affected: from 1782839193 before *)
- cluster-observability-operator/distributed-tracing-console-plugin-rhel9: no versions given (not affected: from 1782838753 before *)
- cluster-observability-operator/logging-console-plugin-pf4-rhel9: no versions given (not affected: from 1782839279 before *)
- cluster-observability-operator/logging-console-plugin-pf5-rhel9: no versions given (not affected: from 1782840539 before *)
- cluster-observability-operator/logging-console-plugin-rhel9: no versions given (not affected: from 1782841925 before *)
- cluster-observability-operator/monitoring-console-plugin-pf5-rhel9: no versions given (not affected: from 1782844225 before *)
- cluster-observability-operator/monitoring-console-plugin-pf6-rhel9: no versions given (not affected: from 1782839658 before *)
- cluster-observability-operator/monitoring-console-plugin-rhel9: no versions given (not affected: from 1782838476 before *)
- cluster-observability-operator/troubleshooting-panel-console-plugin-pf6-rhel9: no versions given (not affected: from 1782839996 before *)
- cluster-observability-operator/troubleshooting-panel-console-plugin-rhel9: no versions given (not affected: from 1782839494 before *)
- ansible-automation-platform/automation-portal: no versions given (not affected: from 1785854226 before *)
- rhdh/rhdh-hub-rhel9: no versions given (not affected: from 1783448184 before *; from 1782761244 before *)
- discovery/discovery-ui-rhel9: no versions given (not affected: from 1782166952 before *)
- rhmtc/openshift-migration-ui-rhel8: no versions given (not affected: from 1783690532 before *)
- openshift4/ose-console: no versions given (not affected: from 1788218669 before *; from 1787028559 before *)
- openshift4/ose-console-rhel9: no versions given (not affected: from 1787054159 before *; from 1787631382 before *; from 1785278569 before *; from 1783718157 before *; from 1782911711 before *; from 1782308675 before *; from 1782224390 before *)
- openshift4/ose-agent-installer-ui-rhel9: no versions given (not affected: from 1784724699 before *; from 1784713741 before *; from 1784721581 before *)
- devspaces/code-rhel9: no versions given (not affected: from 1787762793 before *)
- openshift-service-mesh/kiali-ossmc-rhel8: no versions given (not affected: from 1780907585 before *)
- openshift-service-mesh/kiali-rhel8: no versions given (not affected: from 1780916536 before *)
- openshift-service-mesh/kiali-ossmc-rhel9: no versions given (not affected: from 1780470245 before *; from 1780470706 before *; from 1780470003 before *; from 1780997382 before *)
- openshift-service-mesh/kiali-rhel9: no versions given (not affected: from 1780916345 before *; from 1780916478 before *; from 1780916392 before *; from 1780997438 before *)
- quay/quay-rhel8: no versions given (not affected: from 1782487717 before *; from 1781937357 before *; from 1784351966 before *; from 1781878070 before *)
- quay/quay-rhel9: no versions given (not affected: from 1783955846 before *)
- satellite/iop-vulnerability-frontend-rhel9: no versions given (not affected: from 1781032495 before *)
- gatekeeper/gatekeeper-rhel9: no versions given
- workload-availability/node-healthcheck-must-gather-rhel9: no versions given
- workload-availability/node-healthcheck-operator-bundle: no versions given
- workload-availability/node-healthcheck-rhel9-operator: no versions given
- openshift-lightspeed/lightspeed-console-plugin-419-rhel9: no versions given
- openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9: no versions given
- openshift-lightspeed/lightspeed-console-plugin-rhel9: no versions given
- openshift-pipelines/pipelines-console-plugin-rhel8: no versions given
- openshift-pipelines/pipelines-console-plugin-rhel9: no versions given
- openshift-pipelines/pipelines-hub-ui-rhel8: no versions given
- openshift-pipelines/pipelines-hub-ui-rhel9: no versions given
- openshift-service-mesh/kiali-operator-bundle: no versions given
- openshift-service-mesh/kiali-rhel9-operator: no versions given
- ansible-automation-platform-24/lightspeed-rhel8: no versions given
- ansible-automation-platform-25/lightspeed-rhel8: no versions given
- ansible-automation-platform-26/gateway-rhel9: no versions given
- ansible-automation-platform-26/lightspeed-rhel9: no versions given
- automation-eda-controller: no versions given
- automation-gateway: no versions given
- automation-platform-ui: no versions given
- rh-podman-desktop.git: no versions given
- rhdesktop/rh-podman-desktop-ext-bootc-rhel10: no versions given
- goose: no versions given
- grafana: no versions given
- pcs: no versions given
- rhelai3/bootc-cuda-rhel9: no versions given
- rhelai3/bootc-gaudi-rhel9: no versions given
- rhelai3/bootc-rocm-rhel9: no versions given
- rhelai3/disk-image-cuda-rhel9: no versions given
- rhoai/odh-dashboard-rhel8: no versions given
- rhoai/odh-mlflow-rhel9: no versions given
- and 9 more: see the JSON

## Every score

- harborist: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- harborist: CVSS:4.0 9.2 Critical `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`
- redhat-SADP: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `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`

## References

- <https://github.com/ljharb/shell-quote/security/advisories/GHSA-w7jw-789q-3m8p> (exploit, vendor-advisory, web)
- <https://github.com/ljharb/shell-quote/commit/1518179> (patch, web)
- <https://github.com/ljharb/shell-quote> (package, product)
- <https://www.npmjs.com/package/shell-quote> (product, web)
- <http://www.openwall.com/lists/oss-security/2026/05/23/2> (web)
- <https://access.redhat.com/security/cve/CVE-2026-9277> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2480741> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json>
- <https://access.redhat.com/errata/RHSA-2026:28010> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:34342> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:50850> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:36754> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:33574> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:29197> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:41928> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:62410> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:56912> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:56854> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:60023> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:48699> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:40765> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:44263> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:34791> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:44267> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:29834> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:44237> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:29795> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:62260> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26072> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26080> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26077> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26079> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26090> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:33683> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:30076> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:42796> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:41066> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:28571> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26225> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-9277> (advisory)

## Sources

- CVE List: [CVE-2026-9277](https://www.cve.org/CVERecord?id=CVE-2026-9277), CVE Terms of Use, modified 2026-09-14
- GitHub Advisory Database: [GHSA-w7jw-789q-3m8p](https://github.com/advisories/GHSA-w7jw-789q-3m8p), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-9277](https://nvd.nist.gov/vuln/detail/CVE-2026-9277), Public domain, modified 2026-09-14

---

Page: https://cve.day/CVE-2026-9277 · Whole record: https://cve.day/CVE-2026-9277.json · Rebuilt by cve.day 2026-11-25T22:59:22.179Z
