{"id":"CVE-2026-9277","aliases":["CLSA-2026-1783558964","CLSA-2026-1784683086","CLSA-2026-1791201398","CLSA-2026-1791359284","CLSA-2026-1792163710","DEBIAN-CVE-2026-9277","EUVD-2026-31440","GHSA-w7jw-789q-3m8p","ROOT-APP-NPM-CVE-2026-9277","UBUNTU-CVE-2026-9277","USN-8410-1","openSUSE-SU-2026:10861-1","openSUSE-SU-2026:10979-1","openSUSE-SU-2026:20839-1","openSUSE-SU-2026:20919-1"],"status":"published","title":"shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`","description":"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`.","severity":{"version":"4.0","score":9.2,"vector":"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00793,"percentile":0.56634,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-77","CWE-78"],"published":"2026-05-22T13:22:38Z","modified":"2026-10-28T02:31:04Z","exploits":[{"source":"pocgithub","id":"DylanZahedi/CVE-2026-9277","title":"DylanZahedi/CVE-2026-9277","date":"2026-06-15","url":"https://github.com/DylanZahedi/CVE-2026-9277"}],"fixes":[{"ecosystem":"npm","package":"shell-quote","fixed_in":["1.8.4"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"shell-quote","fixed_in":["1.7.2-tuxcare.2","1.8.3-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-shell-quote","fixed_in":["1.7.4+~1.7.1-1+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-shell-quote","fixed_in":["1.7.4+~1.7.1-1+deb13u1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-shell-quote","fixed_in":["1.8.4+~1.7.5-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"shell-quote","fixed_in":["1.6.3-aikido.3","1.8.1-aikido.1","1.7.2-aikido.2","1.8.0-aikido.2","1.7.3-aikido.1","1.8.3-aikido.2","1.8.3-aikido.3","1.7.3-aikido.2","1.8.2-aikido.1","1.8.0-aikido.1","1.8.2-aikido.2","1.7.2-aikido.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/shell-quote","fixed_in":["1.6.3-root.io.3","1.8.1-root.io.1","1.7.2-root.io.2","1.8.0-root.io.2","1.7.3-root.io.1","1.8.3-root.io.2","1.8.3-root.io.3","1.7.3-root.io.2","1.8.2-root.io.1","1.8.0-root.io.1","1.8.2-root.io.2","1.7.2-root.io.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-shell-quote","fixed_in":["1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-shell-quote","fixed_in":["1.7.3+~1.7.1-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:24.04:LTS","package":"node-shell-quote","fixed_in":["1.7.4+~1.7.1-1ubuntu0.24.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:25.10","package":"node-shell-quote","fixed_in":["1.7.4+~1.7.1-1ubuntu0.25.10.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:26.04:LTS","package":"node-shell-quote","fixed_in":["1.8.3+~1.7.5-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-pytest-html","fixed_in":["4.2.0-2.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.1.0"},{"last_affected":"1.8.3"},{"fixed":"1.8.4"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.7.2-tuxcare.0"},{"fixed":"1.7.2-tuxcare.2"}]}],"versions":["1.7.2","1.7.2-tuxcare.1"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.7.3-tuxcare.0"},{"fixed":"1.7.3-tuxcare.1"}]}],"versions":["1.7.3"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.1-tuxcare.0"},{"fixed":"1.8.1-tuxcare.2"}]}],"versions":["1.8.1","1.8.1-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.3-tuxcare.0"},{"fixed":"1.8.3-tuxcare.1"}]}],"versions":["1.8.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.2-tuxcare.0"},{"fixed":"1.8.2-tuxcare.1"}]}],"versions":["1.8.2"],"bundled":2},{"source":"osv","ecosystem":"Debian:12","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1+deb12u1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1+deb13u1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Debian:14","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.4+~1.7.5-1"}]}],"versions":["1.7.4+~1.7.1-1","1.7.4+~1.7.1-2","1.8.3+~1.7.5-1"]},{"source":"osv","ecosystem":"npm","package":"shell-quote","ranges":[{"type":"SEMVER","events":[{"introduced":"1.1.0"},{"fixed":"1.8.4"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.3-aikido.3"},{"fixed":"1.8.1-aikido.1"},{"fixed":"1.7.2-aikido.2"},{"fixed":"1.8.0-aikido.2"},{"fixed":"1.7.3-aikido.1"},{"fixed":"1.8.3-aikido.2"},{"fixed":"1.8.3-aikido.3"},{"fixed":"1.7.3-aikido.2"},{"fixed":"1.8.2-aikido.1"},{"fixed":"1.8.0-aikido.1"},{"fixed":"1.8.2-aikido.2"},{"fixed":"1.7.2-aikido.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.3-root.io.3"},{"fixed":"1.8.1-root.io.1"},{"fixed":"1.7.2-root.io.2"},{"fixed":"1.8.0-root.io.2"},{"fixed":"1.7.3-root.io.1"},{"fixed":"1.8.3-root.io.2"},{"fixed":"1.8.3-root.io.3"},{"fixed":"1.7.3-root.io.2"},{"fixed":"1.8.2-root.io.1"},{"fixed":"1.8.0-root.io.1"},{"fixed":"1.8.2-root.io.2"},{"fixed":"1.7.2-root.io.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1"}]}],"versions":["1.6.1+20160617-git72fb5a8ce29b-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.3+~1.7.1-1ubuntu0.1~esm1"}]}],"versions":["1.7.3+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1ubuntu0.24.04.1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1ubuntu0.25.10.1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.3+~1.7.5-1","1.9.0+~1.7.5-1","1.10.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.3+~1.7.5-1ubuntu0.1~esm1"}]}],"versions":["1.7.4+~1.7.1-1","1.8.3+~1.7.5-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1"}]}],"versions":["1.6.1+20160617-git72fb5a8ce29b-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.3+~1.7.1-1ubuntu0.1~esm1"}]}],"versions":["1.7.3+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1ubuntu0.24.04.1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.4+~1.7.1-1ubuntu0.25.10.1"}]}],"versions":["1.7.4+~1.7.1-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"node-shell-quote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.3+~1.7.5-1ubuntu0.1~esm1"}]}],"versions":["1.7.4+~1.7.1-1","1.8.3+~1.7.5-1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-pytest-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.0-2.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"agama-web-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"21+360.16caae772-44.1"}]}],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"agama-web-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17+612.d8bf69336-160000.11.1"}]}],"bundled":4}],"products":[{"vendor":"","product":"shell-quote"},{"vendor":"red hat","product":"cluster observability operator 1.5.0"},{"vendor":"red hat","product":"cryostat 4"},{"vendor":"red hat","product":"cryostat 4 on rhel 9"},{"vendor":"red hat","product":"gatekeeper 3"},{"vendor":"red hat","product":"node healthcheck operator"},{"vendor":"red hat","product":"openshift lightspeed"},{"vendor":"red hat","product":"openshift pipelines"},{"vendor":"red hat","product":"openshift service mesh 3"},{"vendor":"red hat","product":"red hat amq broker 7"},{"vendor":"red hat","product":"red hat ansible automation platform 2"},{"vendor":"red hat","product":"red hat ansible automation platform 2.1"},{"vendor":"red hat","product":"red hat build of apache camel - hawtio 4"},{"vendor":"red hat","product":"red hat build of podman desktop"},{"vendor":"red hat","product":"red hat build of podman desktop - tech preview"},{"vendor":"red hat","product":"red hat data grid 8"},{"vendor":"red hat","product":"red hat developer hub 1.10"},{"vendor":"red hat","product":"red hat developer hub 1.9"},{"vendor":"red hat","product":"red hat discovery 2"},{"vendor":"red hat","product":"red hat enterprise linux 10"},{"vendor":"red hat","product":"red hat enterprise linux 8"},{"vendor":"red hat","product":"red hat enterprise linux 9"},{"vendor":"red hat","product":"red hat enterprise linux ai (rhel ai) 3"},{"vendor":"red hat","product":"red hat fuse 7"},{"vendor":"red hat","product":"red hat migration toolkit 1.8"},{"vendor":"red hat","product":"red hat openshift ai (rhoai)"},{"vendor":"red hat","product":"red hat openshift container platform 4.14"},{"vendor":"red hat","product":"red hat openshift container platform 4.15"},{"vendor":"red hat","product":"red hat openshift container platform 4.16"},{"vendor":"red hat","product":"red hat openshift container platform 4.17"},{"vendor":"red hat","product":"red hat openshift container platform 4.18"},{"vendor":"red hat","product":"red hat openshift container platform 4.19"},{"vendor":"red hat","product":"red hat openshift container platform 4.20"},{"vendor":"red hat","product":"red hat openshift container platform 4.21"},{"vendor":"red hat","product":"red hat openshift container platform 4.22"},{"vendor":"red hat","product":"red hat openshift dev spaces 3.30"},{"vendor":"red hat","product":"red hat openshift service mesh 2.6"},{"vendor":"red hat","product":"red hat openshift service mesh 3.0"},{"vendor":"red hat","product":"red hat openshift service mesh 3.1"},{"vendor":"red hat","product":"red hat openshift service mesh 3.2"},{"vendor":"red hat","product":"red hat openshift service mesh 3.3"},{"vendor":"red hat","product":"red hat openshift virtualization 4"},{"vendor":"red hat","product":"red hat quay 3.10"},{"vendor":"red hat","product":"red hat quay 3.12"},{"vendor":"red hat","product":"red hat quay 3.15"},{"vendor":"red hat","product":"red hat quay 3.16"},{"vendor":"red hat","product":"red hat quay 3.9"},{"vendor":"red hat","product":"red hat satellite 6.18"},{"vendor":"red hat","product":"red hat trusted artifact signer"}],"references":[{"url":"https://github.com/ljharb/shell-quote/security/advisories/GHSA-w7jw-789q-3m8p","tags":["vendor-advisory","exploit","advisory","web","report"]},{"url":"https://github.com/ljharb/shell-quote/commit/1518179","tags":["patch","fix","web","report"]},{"url":"https://github.com/ljharb/shell-quote","tags":["product","package","report"]},{"url":"https://www.npmjs.com/package/shell-quote","tags":["product","web","report"]},{"url":"http://www.openwall.com/lists/oss-security/2026/05/23/2","tags":["web","report"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-9277","tags":["vdb-entry","x_refsource_REDHAT","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2480741","tags":["issue-tracking","x_refsource_REDHAT","report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json","tags":["x_sadp-csaf-vex","web"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28010","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:34342","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:50850","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:36754","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33574","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:29197","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:41928","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:62410","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:56912","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:56854","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:60023","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:48699","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:40765","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:44263","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:34791","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:44267","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:29834","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:44237","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:29795","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:62260","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26072","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26080","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26077","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26079","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26090","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33683","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:30076","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:42796","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:41066","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28571","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:26225","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-9277","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-w7jw-789q-3m8p"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/9xxx/CVE-2026-9277.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-9277","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-9277","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-9277","tags":["report"]},{"url":"https://github.com/ljharb/shell-quote/commit/4378a6e613db5948168684864e49b42b83134d2d","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-8410-1","tags":["advisory"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-9277","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-6402","tags":["web"]},{"url":"https://bugzilla.suse.com/1266254","tags":["report"]},{"url":"https://bugzilla.suse.com/1246678","tags":["report"]},{"url":"https://bugzilla.suse.com/1264160","tags":["report"]},{"url":"https://bugzilla.suse.com/1264802","tags":["report"]},{"url":"https://bugzilla.suse.com/1266256","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2025-7339","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-42041","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-42264","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-9277","title":"shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`","description":"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`.","status":"published","published":"2026-05-22T13:22:38.873Z","modified":"2026-09-14T12:04:27.683Z","cvss":[{"version":"4.0","score":9.2,"vector":"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","level":"critical","assessor":"cna"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-78","CWE-77","CWE-78"],"updated_at":"2026-11-02T13:42:37.965383Z"}],"euvd":[{"id":"EUVD-2026-31440","description":"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`.","status":"published","published":"2026-05-22T13:22:38Z","modified":"2026-09-14T12:04:27Z","cvss":[{"version":"4.0","score":9.2,"vector":"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","level":"critical"}],"updated_at":"2026-11-02T17:28:21.2136Z"}],"ghsa":[{"id":"GHSA-w7jw-789q-3m8p","title":"shell-quote quote() does not escape newlines in object .op values","description":"### Summary\n\n`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 `\\n` as a command separator, so any content after it would execute as a second command.\n\nThe vulnerable code path is reachable in two ways. Neither requires the parser to misbehave — `parse()` only emits ops from a fixed control set — but both are documented API surface:\n\n1. **Direct construction.** A caller builds `{ op: '...\\n...' }` from external input (e.g. a deserialized argument array) and passes it to `quote()`.\n2. **`envFn` return.** `parse(cmd, envFn)` is documented to splice the return value of `envFn` into the result array when it is an object. An attacker-influenced data source consulted by `envFn` can introduce an object token whose `.op` reaches `quote()`.\n\n### Impact\n\nShell command injection in callers that pass object tokens with attacker-influenced `.op` values to `quote()` and then hand the result to a shell. The preconditions are narrower than ordinary string injection — they require the caller to feed object tokens into `quote()` — but object tokens are a public, documented part of the API surface, and `quote()` is intended to be a shell-safety boundary.\n\n### PoC\n\n```js\nconst { parse, quote } = require('shell-quote');\n\n// Direct construction\nquote([{ op: ';\\nid' }]);\n// → \"\\;\\n\\\\i\\\\d\"  ← literal newline; second line executes as a command\n\n// Via parse() with an envFn returning attacker-shaped objects\nconst tokens = parse('echo $X', () =\u003e ({ op: ';\\nid' }));\nrequire('child_process').execSync(quote(tokens), { shell: true });\n// Executes `id` after `echo \\;`.\n```\n\nConfirmed under `sh`, `bash`, `dash`, and `zsh`.\n\n### Patch\n\nFixed by replacing the per-character escape with strict shape validation in `quote()`. The object-token branch now:\n\n- **`{ op }`** — `.op` must be a string from the same allowlist the parser emits (`||`, `\u0026\u0026`, `;;`, `|\u0026`, `\u003c(`, `\u003c\u003c\u003c`, `\u003e\u003e`, `\u003e\u0026`, `\u003c\u0026`, `\u0026`, `;`, `(`, `)`, `|`, `\u003c`, `\u003e`). Anything else throws `TypeError`. This is the direct fix for the reported issue and removes the entire class of `.op` injection.\n- **`{ op: 'glob', pattern }`** — `.pattern` must be a string with no line terminators. Glob metacharacters (`*`, `?`, `[`, `]`, `{`, `}`, `,`) pass through; all other shell-special characters are backslash-escaped. (Previously the pattern field was discarded entirely and the literal string `\\g\\l\\o\\b` was emitted — a latent bug, not security-relevant.)\n- **`{ comment }`** — `.comment` must be a string with no line terminators (line terminators would end the shell comment and resume command parsing — same injection shape).\n- **Any other object shape** — `TypeError`.\n\nThe fix is allowlist-based rather than a targeted regex tweak, so it closes the reported vector and forecloses adjacent ones (U+2028 / U+2029 line separators in `.op`, line terminators in comments, unknown-shape objects coerced through `.replace`).\n\n### Workarounds\n\nPrior to upgrading, callers that build object tokens from untrusted input should validate `.op` against the parser's operator set themselves, and never construct `{ op }` from attacker-controlled strings.\n\n### Credits\n\nReported by Akshat Sinha","status":"published","published":"2026-06-09T14:27:15Z","modified":"2026-06-09T14:27:16Z","cvss":[{"version":"4.0","score":9.2,"vector":"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","level":"critical"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:40:24.856614Z"}],"nvd":[{"id":"CVE-2026-9277","description":"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`.","status":"published","published":"2026-05-22T14:16:30.33Z","modified":"2026-09-14T13:19:33.133Z","cvss":[{"version":"4.0","score":9.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:12:20.131508Z"}],"osv":[{"id":"CVE-2026-9277","title":"shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`","description":"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`.","status":"published","published":"2026-05-22T13:22:38.873Z","modified":"2026-10-28T02:31:04.557500128Z","cvss":[{"version":"4.0","score":9.2,"vector":"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","level":"critical"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T15:45:20.588039Z"},{"id":"DEBIAN-CVE-2026-9277","description":"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`.","status":"published","published":"2026-05-22T14:16:30.33Z","modified":"2026-10-01T03:03:45.95840119Z","cvss":[{"version":"4.0","score":9.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical"}],"updated_at":"2026-11-02T15:46:06.846102Z"},{"id":"GHSA-w7jw-789q-3m8p","title":"shell-quote quote() does not escape newlines in object .op values","description":"### Summary\n\n`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 `\\n` as a command separator, so any content after it would execute as a second command.\n\nThe vulnerable code path is reachable in two ways. Neither requires the parser to misbehave — `parse()` only emits ops from a fixed control set — but both are documented API surface:\n\n1. **Direct construction.** A caller builds `{ op: '...\\n...' }` from external input (e.g. a deserialized argument array) and passes it to `quote()`.\n2. **`envFn` return.** `parse(cmd, envFn)` is documented to splice the return value of `envFn` into the result array when it is an object. An attacker-influenced data source consulted by `envFn` can introduce an object token whose `.op` reaches `quote()`.\n\n### Impact\n\nShell command injection in callers that pass object tokens with attacker-influenced `.op` values to `quote()` and then hand the result to a shell. The preconditions are narrower than ordinary string injection — they require the caller to feed object tokens into `quote()` — but object tokens are a public, documented part of the API surface, and `quote()` is intended to be a shell-safety boundary.\n\n### PoC\n\n```js\nconst { parse, quote } = require('shell-quote');\n\n// Direct construction\nquote([{ op: ';\\nid' }]);\n// → \"\\;\\n\\\\i\\\\d\"  ← literal newline; second line executes as a command\n\n// Via parse() with an envFn returning attacker-shaped objects\nconst tokens = parse('echo $X', () =\u003e ({ op: ';\\nid' }));\nrequire('child_process').execSync(quote(tokens), { shell: true });\n// Executes `id` after `echo \\;`.\n```\n\nConfirmed under `sh`, `bash`, `dash`, and `zsh`.\n\n### Patch\n\nFixed by replacing the per-character escape with strict shape validation in `quote()`. The object-token branch now:\n\n- **`{ op }`** — `.op` must be a string from the same allowlist the parser emits (`||`, `\u0026\u0026`, `;;`, `|\u0026`, `\u003c(`, `\u003c\u003c\u003c`, `\u003e\u003e`, `\u003e\u0026`, `\u003c\u0026`, `\u0026`, `;`, `(`, `)`, `|`, `\u003c`, `\u003e`). Anything else throws `TypeError`. This is the direct fix for the reported issue and removes the entire class of `.op` injection.\n- **`{ op: 'glob', pattern }`** — `.pattern` must be a string with no line terminators. Glob metacharacters (`*`, `?`, `[`, `]`, `{`, `}`, `,`) pass through; all other shell-special characters are backslash-escaped. (Previously the pattern field was discarded entirely and the literal string `\\g\\l\\o\\b` was emitted — a latent bug, not security-relevant.)\n- **`{ comment }`** — `.comment` must be a string with no line terminators (line terminators would end the shell comment and resume command parsing — same injection shape).\n- **Any other object shape** — `TypeError`.\n\nThe fix is allowlist-based rather than a targeted regex tweak, so it closes the reported vector and forecloses adjacent ones (U+2028 / U+2029 line separators in `.op`, line terminators in comments, unknown-shape objects coerced through `.replace`).\n\n### Workarounds\n\nPrior to upgrading, callers that build object tokens from untrusted input should validate `.op` against the parser's operator set themselves, and never construct `{ op }` from attacker-controlled strings.\n\n### Credits\n\nReported by Akshat Sinha","status":"published","published":"2026-06-09T14:27:15Z","modified":"2026-09-10T03:50:50.749716623Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":9.2,"vector":"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","level":"critical"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T15:46:58.401149Z"},{"id":"UBUNTU-CVE-2026-9277","description":"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`.","status":"published","published":"2026-05-22T14:16:00Z","modified":"2026-10-17T13:01:17.62643222Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":9.2,"vector":"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","level":"critical"}],"updated_at":"2026-11-02T16:57:40.980117Z"},{"id":"CLSA-2026-1783558964","title":"TuxCare security update for shell-quote (1 CVE)","description":"TuxCare rebuilt shell-quote to address 1 CVE. Fixed in 1.7.2-tuxcare.2.","status":"published","published":"2026-08-04T14:52:42Z","modified":"2026-10-15T09:48:03.787705907Z","updated_at":"2026-11-02T15:43:46.151924Z"},{"id":"CLSA-2026-1784683086","title":"TuxCare security update for shell-quote (2 CVEs)","description":"TuxCare rebuilt shell-quote to address 2 CVEs. Fixed in 1.7.3-tuxcare.1.","status":"published","published":"2026-08-04T14:52:47Z","modified":"2026-10-15T09:47:54.242122463Z","updated_at":"2026-11-02T15:43:46.482572Z"},{"id":"CLSA-2026-1791201398","title":"TuxCare security update for shell-quote (2 CVEs)","description":"TuxCare rebuilt shell-quote to address 2 CVEs. Fixed in 1.8.1-tuxcare.2.","status":"published","published":"2026-10-05T11:56:38Z","modified":"2026-10-15T09:47:58.197677644Z","updated_at":"2026-11-02T15:43:49.016976Z"},{"id":"CLSA-2026-1791359284","title":"TuxCare security update for shell-quote (1 CVE)","description":"TuxCare rebuilt shell-quote to address 1 CVE. Fixed in 1.8.3-tuxcare.1.","status":"published","published":"2026-10-07T07:48:04Z","modified":"2026-10-15T09:47:39.74072104Z","updated_at":"2026-11-02T15:43:49.016976Z"},{"id":"CLSA-2026-1792163710","title":"TuxCare security update for shell-quote (2 CVEs)","description":"TuxCare rebuilt shell-quote to address 2 CVEs. Fixed in 1.8.2-tuxcare.1.","status":"published","published":"2026-10-16T15:15:09Z","modified":"2026-10-16T16:30:10.808889362Z","updated_at":"2026-11-02T15:43:51.466048Z"},{"id":"openSUSE-SU-2026:10861-1","title":"python311-pytest-html-4.2.0-2.1 on GA media","description":"These are all security issues fixed in the python311-pytest-html-4.2.0-2.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-05-26T00:00:00Z","modified":"2026-05-27T08:15:30.156658365Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:10979-1","title":"agama-web-ui-21+360.16caae772-44.1 on GA media","description":"These are all security issues fixed in the agama-web-ui-21+360.16caae772-44.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-06-09T00:00:00Z","modified":"2026-06-10T18:24:13.384556289Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:20839-1","title":"Security update for python-pytest-html","description":"This update for python-pytest-html fixes the following issues:\n\nChanges in python-pytest-html:\n\n- CVE-2026-9277: shell-quote: improper escaping of newlines (bsc#1266254)\n  Update the vendored shell-quote to 1.8.4 node_modules\n","status":"published","published":"2026-05-28T12:20:45Z","modified":"2026-05-31T18:24:30.457269557Z","updated_at":"2026-11-02T16:58:41.463445Z"},{"id":"openSUSE-SU-2026:20919-1","title":"Security update for agama-web-ui","description":"This update for agama-web-ui fixes the following issues\n\n- CVE-2025-7339: on-headers: incorrect array handling may lead to HTTP response header manipulation (bsc#1246678).\n- CVE-2026-9277: shell-quote: improper escaping of newlines in object .op values by quote() can lead to shell command\n  injection (bsc#1266256).\n- CVE-2026-42041: axios: authentication bypass via validateStatus prototype pollution gadget due to suppression of HTTP\n  error (bsc#1264160).\n- CVE-2026-42264: axios: prototype pollution read-side gadgets in HTTP adapter can lead to credential injection and\n  request h (bsc#1264802).\n\nChanges for agama-web-ui:\n\n- Update other dependencies reported by \"npm audit\".\n","status":"published","published":"2026-06-08T10:21:35Z","modified":"2026-06-10T18:24:17.693678831Z","updated_at":"2026-11-02T16:58:41.885092Z"},{"id":"ROOT-APP-NPM-CVE-2026-9277","title":"CVE-2026-9277 in shell-quote - Patched by Root","description":"Root has patched CVE-2026-9277 in the shell-quote package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-09-10T06:37:31Z","modified":"2026-09-10T07:15:07.939454788Z","updated_at":"2026-11-02T15:53:27.649662Z"},{"id":"USN-8410-1","title":"node-shell-quote vulnerability","description":"Akshat Sinha discovered that shell-quote improperly validated object-token\ninputs. An attacker could possibly use this issue to cause shell-quote to\ncrash, resulting in a denial of service, or execute arbitrary code.","status":"published","published":"2026-06-09T08:38:23Z","modified":"2026-07-29T19:59:52.643277618Z","updated_at":"2026-11-02T16:58:25.103481Z"}]}}
