Skip to content

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

CriticalCVSS 9.2 EPSS 0.48%
Published
Updated
Exploit status
No public exploit known

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.

Affected products

ProductAffected versionsFixed in
npm shell-quote(npm) >= 1.8.4, < 1.11.0 1.11.0
redhat/discovery/discovery-ui-rhel9:1792603924(Red Hat:discovery:2::el9) All versions No fix listed
redhat/discovery/discovery-ui-rhel9:1793218530(Red Hat:discovery:2::el9) All versions No fix listed
redhat/jaeger-main(Red Hat:hummingbird:1) < 2.20.0-0.11.hum1 2.20.0-0.11.hum1
redhat/grafana13-1-main(Red Hat:hummingbird:1) < 13.1.6-0.4.hum1 13.1.6-0.4.hum1
redhat/grafana13-2-main(Red Hat:hummingbird:1) < 13.2.1-0.8.hum1 13.2.1-0.8.hum1
redhat/prometheus3-13-main(Red Hat:hummingbird:1) < 3.13.3-0.2.hum1 3.13.3-0.2.hum1
redhat/openshift-lightspeed/lightspeed-agentic-console-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-console-plugin-419-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-console-plugin-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-hub-ui-rhel8(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-hub-ui-rhel9(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/rhoai/odh-core-bff-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-agent-ops-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-automl-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-autorag-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-eval-hub-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-maas-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-mlflow-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-mod-arch-model-registry-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/devspaces/code-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/external-secrets-management/console-plugin-rhel9(Red Hat:secrets_management_console:0) All versions No fix listed
redhat/ansible-automation-platform/automation-portal(Red Hat:ansible_portal:2) All versions No fix listed
Show 17 more
ProductAffected versionsFixed in
ubuntu/node-shell-quote(Ubuntu:22.04) All versions No fix listed
ubuntu/node-shell-quote(Ubuntu:24.04) All versions No fix listed
ubuntu/node-shell-quote(Ubuntu:26.04) All versions No fix listed
ubuntu/node-shell-quote(Ubuntu:26.10) All versions No fix listed
debian/node-shell-quote(Debian:12) < 1.7.4+~1.7.1-1+deb12u2 1.7.4+~1.7.1-1+deb12u2
debian/node-shell-quote(Debian:12) = 1.7.4+~1.7.1-1 No fix listed
debian/node-shell-quote(Debian:12) = 1.7.4+~1.7.1-1+deb12u1 No fix listed
debian/node-shell-quote(Debian:13) < 1.7.4+~1.7.1-1+deb13u2 1.7.4+~1.7.1-1+deb13u2
debian/node-shell-quote(Debian:13) = 1.7.4+~1.7.1-1 No fix listed
debian/node-shell-quote(Debian:13) = 1.7.4+~1.7.1-1+deb13u1 No fix listed
debian/node-shell-quote(Debian:14) < 1.12.0-1 1.12.0-1
debian/node-shell-quote(Debian:14) = 1.10.0-1 No fix listed
debian/node-shell-quote(Debian:14) = 1.7.4+~1.7.1-1 No fix listed
debian/node-shell-quote(Debian:14) = 1.7.4+~1.7.1-2 No fix listed
debian/node-shell-quote(Debian:14) = 1.8.3+~1.7.5-1 No fix listed
debian/node-shell-quote(Debian:14) = 1.8.4+~1.7.5-1 No fix listed
debian/node-shell-quote(Debian:14) = 1.9.0+~1.7.5-1 No fix listed

References