CVE-2026-9277
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedshell-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`.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe shell-quote library's quote() function fails to validate object-token inputs against the operator model used by parse(). The per-character backslash escaping regex /(.)/g does not match JavaScript line terminators (\n, \r, U+2028, U+2029), allowing line terminators in the .op field to pass through unescaped. Since POSIX shells treat literal newlines as command separators, content after an unescaped newline executes as a second command, enabling command injection.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Locate shell-quote in your project dependenciesSearch your package.json or run 'npm ls shell-quote' to identify if shell-quote is installed as a direct or transitive dependencyAffected if shell-quote is present in the dependency tree and uses the quote() function with object tokens
-
Identify the installed versionRun 'npm list shell-quote' or check the version field in node_modules/shell-quote/package.jsonAffected if the version is unknown or earlier than the patched release that addresses line terminator escaping
-
Audit quote() function usage with object tokensSearch your codebase for calls to the quote() function and inspect whether object tokens containing an .op (operator) field are passed to it, especially from external or user-controlled inputAffected if code passes object tokens with .op fields derived from external input to the quote() function
-
Inspect parse() function for custom envFn callbacksSearch for invocations of parse() that include a custom envFn callback parameter, which can introduce object tokens into the parsing processAffected if a custom envFn is used and it generates object tokens from untrusted sources
-
Check for external input in object token constructionTrace data flow from HTTP requests, CLI arguments, environment variables, or file reads to see if any flow into code that creates object tokens with .op fields for shell-quoteAffected if external input reaches object token .op fields without sanitization
You are affected if shell-quote is installed, its version lacks the line terminator fix, and your code passes object tokens with .op fields (especially from external input) to the quote() function or uses custom envFn callbacks that introduce untrusted object tokens.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to a version with the fix that implements strict shape validation: control-operator allowlisting for .op, pattern validation forbidding line terminators for glob/comment objects, and TypeError for unrecognized shapes. If upgrade is not possible, ensure no external input can populate the .op field of object tokens passed to quote().
Latest stable version that includes the fix from commit 1518179 (verify via npm or GitHub releases)
- Check your project's dependency on shell-quote using `npm list shell-quote` or reviewing package.json
- Identify the current version and compare against the fixed version that includes commit 1518179
- Run `npm install shell-quote@latest` or `npm update shell-quote` to upgrade to the patched version
- After upgrade, verify the version change with `npm list shell-quote`
- Test that your shell-quote integration still functions correctly, as the fix adds strict shape validation that throws TypeError for unexpected object shapes
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation5.0 h
- Testing5.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,464.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-9277 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sources- github.com
- github.com
- github.com
- github.com
- www.npmjs.com
- www.openwall.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- bugzilla.redhat.com
- security.access.redhat.com
- nvd.nist.gov
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-9277 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data