---
title: "CVE-2026-9277: shell-quote quote() does not escape newlines in object .op values"
url: https://erroneo.us/security/cve/CVE-2026-9277/
description: "CVE-2026-9277 (shell-quote (npm)): shell-quote's quote() function did not validate object-token inputs against the operator model used by parse(). The .op…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-05-22
date_modified: 2026-09-14
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-9277"
kev: false
cvss: 9.2
epss: 0.00824
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-9277: shell-quote quote() does not escape newlines in object .op values

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.8% , percentile 57: FIRST’s model estimates a 0.8% chance of exploitation activity in the next 30 days, higher than 57% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes shell-quote (npm) >= 1.1.0, <= 1.8.3, fixed in 1.8.4 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- npm `shell-quote` >= 1.1.0, <= 1.8.3 → fixed: 1.8.4

## Affected products (CVE record)

-  shell-quote: 1.1.0 < 1.8.4

## Severity

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

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.82% probability of exploitation activity in the next 30 days; percentile 57.

## Sources

- [GHSA-w7jw-789q-3m8p](https://github.com/ljharb/shell-quote/security/advisories/GHSA-w7jw-789q-3m8p)
- [Fix commit](https://github.com/ljharb/shell-quote/commit/1518179)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:28010)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:34342)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:50850)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:36754)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:33574)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:29197)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:41928)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:62410)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:56912)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:56854)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:60023)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:48699)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:40765)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:44263)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:34791)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:44267)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:29834)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:44237)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:29795)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:62260)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26072)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26080)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26077)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26079)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26090)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:33683)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:30076)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:42796)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:41066)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:28571)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:26225)
- [GitHub Advisory GHSA-w7jw-789q-3m8p](https://github.com/advisories/GHSA-w7jw-789q-3m8p)
- [CVE.org record CVE-2026-9277](https://www.cve.org/CVERecord?id=CVE-2026-9277)
- [NVD entry CVE-2026-9277](https://nvd.nist.gov/vuln/detail/CVE-2026-9277)
- [github.com](https://github.com/ljharb/shell-quote)
- [npmjs.com](https://www.npmjs.com/package/shell-quote)
- [openwall.com](http://www.openwall.com/lists/oss-security/2026/05/23/2)
- [access.redhat.com](https://access.redhat.com/security/cve/CVE-2026-9277)
- [RHBZ#2480741](https://bugzilla.redhat.com/show_bug.cgi?id=2480741)
- [security.access.redhat.com](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json)

---
Source page: https://erroneo.us/security/cve/CVE-2026-9277/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
