cbcvebase.
CVE-2026-9277
published 2026-05-22

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

high8.1CVSS 3.1
AVNACHPRNUINSUCHIHAH
shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op` 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

48 ranges· showing 25
VendorProductVersion rangeFixed in
ansible-automation-platform-24lightspeed-rhel8
ansible-automation-platform-25lightspeed-rhel8
ansible-automation-platform-26gateway-rhel9
ansible-automation-platform-26lightspeed-rhel9
ansible-automation-platformautomation-portal
clusterlabspcs
container-native-virtualizationkubevirt-console-plugin-rhel9
discoverydiscovery-ui-rhel9
gatekeepergatekeeper-rhel9
grafanagrafana
openshift-lightspeedlightspeed-console-plugin-419-rhel9
openshift-lightspeedlightspeed-console-plugin-pf5-rhel9
openshift-lightspeedlightspeed-console-plugin-rhel9
openshift-pipelinespipelines-console-plugin-rhel8
openshift-pipelinespipelines-console-plugin-rhel9
openshift-pipelinespipelines-hub-ui-rhel8
openshift-pipelinespipelines-hub-ui-rhel9
openshift-service-meshkiali-operator-bundle
openshift-service-meshkiali-ossmc-rhel8
openshift-service-meshkiali-ossmc-rhel9
openshift-service-meshkiali-rhel8
openshift-service-meshkiali-rhel9
openshift-service-meshkiali-rhel9-operator
openshift4ose-agent-installer-ui-rhel9
openshift4ose-console-rhel9