Bug 2480741 (CVE-2026-9277)

Summary: CVE-2026-9277 shell-quote: shell-quote: Arbitrary code execution via command injection due to unescaped line terminators
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aazores, abarbaro, abrianik, alcohan, alizardo, anpicker, anthomas, aruklets, ataylor, bbrownin, bdettelb, bparees, brasmith, cdrage, cmah, cochase, dbruscin, dkeler, doconnor, dranck, dschmidt, dymurray, eaguilar, ebaron, eborisov, ehelms, ehugonne, erezende, fdeutsch, ggainey, ggrzybek, gmalinko, gparvin, hasun, ibolton, janstey, jbalunas, jchui, jfula, jhe, jkoehler, jlanda, jmatsuok, jmatthew, jmontleo, jolong, jowilson, jpasqual, jraez, jtolenti, juwatts, jwong, kaycoth, kshier, ktsao, kvanderr, lball, lchilton, lphiri, mdellweg, mhulan, mstipich, nboldt, ngough, nmoumoul, nyancey, oaljalju, omaciel, ometelka, oramraz, osousa, pahickey, parichar, pcreech, pdelbell, pgaikwad, pjindal, psrna, ptisnovs, rchan, rexwhite, rhaigner, rhel-process-autobot, rjohnson, rstepani, rushinde, sdawley, sfeifer, simaishi, slucidi, smallamp, smcdonal, smullick, sseago, stcannon, sthirugn, stirabos, suppawar, syedriko, tasato, teagle, thason, tmalecek, ttakamiy, veshanka, watson-tool-maintainers, xdharmai, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in the shell-quote component. The quote() function did not properly validate object-token inputs, allowing line terminators to pass unescaped into the output. A remote attacker could exploit this vulnerability by providing specially crafted input, which a POSIX shell would interpret as a command separator. This could lead to command injection, enabling the attacker to execute arbitrary code on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-05-22 14:01:37 UTC
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`.

Comment 2 errata-xmlrpc 2026-06-22 17:16:04 UTC
This issue has been addressed in the following products:

  Cryostat 4 on RHEL 9

Via RHSA-2026:28010 https://access.redhat.com/errata/RHSA-2026:28010