# CVE-2026-102422: shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token

> Attackers can execute arbitrary shell commands by injecting line terminators into strings following comment tokens in shell-quote's quote() function.

- **Severity:** Critical 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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Sep 2026
- **Updated:** 30 Sep 2026
- **Also known as:** CLEANSTART-2026-SW67186, CLEANSTART-2026-VG90547, CLSA-2026-1790673243, DEBIAN-CVE-2026-102422, ECHO-e4ca-6368-1428, GHSA-pqg4-j6r4-53mv, MINI-38cr-c3p8-9rf3, MINI-q5xv-qcqf-8rc3, MINI-xq7g-7rq4-vf6p, MINI-xqm9-8jg8-5r93, RHSA-2026:69544, ROOT-APP-NPM-CVE-2026-102422, UBUNTU-CVE-2026-102422

## What is CVE-2026-102422?

CVE-2026-102422 is a critical command injection vulnerability in shell-quote, published on 29 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

shell-quote's `quote()` function emits a `{ comment }` token as `#` followed by its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator (\n, \r, U+2028, U+2029) in that later string therefore ends the comment, and the rest of the string is parsed as shell input: `quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#'])` runs `id` in sh, bash, dash, ksh and zsh. `parse()` emits a comment token for a `#` in the middle of a word (for example `http://example.com/#frag`), so callers that combine `parse()` output with another untrusted string, such as `quote(parse(untrustedCommand).concat(untrustedArg))`, are affected. The fix for CVE-2026-9277 rejected line terminators in the comment's own text, but not in the tokens after it. Fixed in 1.11.0: `quote()` throws a `TypeError` when a string after a `{ comment }` token contains a line terminator.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-102422?

2 open source packages ship an affected version, including shell-quote.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `shell-quote` | npm | From 1.8.4 | 1.11.0 |
| `shell-quote` | npm | From 1.8.4 | 1.11.0 |
| `jaeger` | Red Hat:hummingbird:1 | All versions | 0:2.20.0-0.11.hum1 |

## How do I fix CVE-2026-102422?

Upgrade shell-quote to 1.11.0 or later.

## Is CVE-2026-102422 being exploited?

There is no known exploitation of CVE-2026-102422 in the wild and no public exploit code.

Public exploit code:

- CVE-2026-102422 POC (github_poc): https://github.com/DevVaibhav07/CVE-2026-102422

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-102422 and fix it if it is affected.

What it is: CVE-2026-102422 is a critical command injection vulnerability in shell-quote, published on 29 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-102422 in the wild and no public exploit code.

Affected packages and fixed versions:
- shell-quote (npm): affected from 1.8.4; fixed in 1.11.0
- shell-quote (npm): affected from 1.8.4; fixed in 1.11.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-102422/ (Markdown: https://insights.sbomify.com/CVE-2026-102422/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-102422
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-102422
- OSV: https://osv.dev/vulnerability/CVE-2026-102422

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-102422/
Summaries are generated and may contain mistakes; the official description above is the record.
