shell-quote newline operator boundary¶
Source: hourly offensive-security scan, 2026-06-09. Primary entry: GitHub advisory GHSA-w7jw-789q-3m8p / CVE-2026-9277 for shell-quote.
This page is durable because it captures a reusable bug-hunting pattern: shell-quoting APIs may be safe for strings but unsafe for structured tokens supplied by plugins, workflow definitions, environment callbacks, agent protocols, or deserialized job state.
What changed¶
shell-quotestructured-token command injection,shell-quote>= 1.1.0, <= 1.8.3failed to validate object-token.opvalues inquote(). JavaScript/(.)/gescaping did not match line terminators, so a crafted operator such as{ op: ';\n...' }could place a literal newline into the shell command. POSIX shells treat that newline as a command separator. Fixed in1.8.4with an allowlist aligned to parser-emitted operators.- Direct object-token construction is the main hunt surface, the advisory identifies callers that build
{ op: '...\n...' }from external input, for example a deserialized argument array, and then pass the object token toquote(). envFnobject-token return is the second route,parse(cmd, envFn)can splice an object returned byenvFninto the token array. IfenvFnconsults attacker-controlled data and the resulting tokens reachquote()and then a shell, the newline operator becomes a command separator.- The parser is not the vulnerable boundary,
parse()emits operators from a fixed control set. The failure isquote()accepting caller-provided object shapes and attempting character escaping where shape validation was required.
Operator triage¶
- Find shell wrappers that treat
quote()as the safety boundary: search JavaScript/TypeScript repos forrequire('shell-quote'),from 'shell-quote',quote(tokens), andparse(command, envFn). - Follow output to shell sinks: prioritize paths where
quote()output flows intochild_process.exec,execSync,spawn(..., { shell: true }), package-manager scripts, task runners, CI helpers, MCP/agent tool execution, or shell scripts. - Prioritize structured-token sources: the interesting cases are not ordinary string arguments. Look for JSON-deserialized token arrays, plugin-supplied token objects, custom
envFncallbacks, workflow variable expansion, job replay/state files, and user-controlled objects withop,comment, orpatternfields. - Check version and reachability together: vulnerable range is
>= 1.1.0, <= 1.8.3; fixed version is1.8.4. A dependency-only finding is weaker than a reachable structured-token-to-shell path. - Use canaries over secrets: execute only harmless local markers in a lab or staging clone. Do not prove impact by reading environment variables, keys, tokens, source files, cloud metadata, or customer data.
Replayable validation boundaries¶
- Only test code paths where the application already passes
shell-quoteoutput to a shell. If the result is kept as an argv array or never executed, the finding may be a library exposure without reachable impact. - In a lab clone, build a token array with an operator containing a line terminator and a benign canary command. A safe proof is that the rendered command contains a literal newline in an operator slot and, when executed in the lab, runs only a harmless
printf/echomarker. - For direct construction, trace where an attacker can influence the token object before it reaches
quote(): API request body, config file, plugin manifest, workflow node parameter, job queue payload, or serialized task state. - For
envFn, show the callback can return an attacker-shaped object token. Avoid claiming parser bypass; the issue is object-token insertion by caller-supplied callback logic and insufficient validation inquote(). - Capture the token source, rendered command string with control characters made visible, shell used (
sh,bash,dash, orzsh), and the exact sink. Redact paths, usernames, hostnames, and internal job data unless they are synthetic.
Reporting heuristics¶
- Lead with the trust boundary: untrusted structured token to shell command separator.
- Include preconditions explicitly: package version, object-token reachability, line-terminator preservation, shell execution sink, and whether the route is direct object construction or
envFnreturn. - Provide a minimal code or request transcript using documentation/example values and a harmless canary. Avoid weaponized commands and production-sensitive output.
- If a product embeds
shell-quote, report the vulnerable application path rather than only the dependency version. The durable bug-hunting target is any shell-safety wrapper that accepts structured tokens from untrusted plugins, workflows, or agent protocols. - Recommend allowlist validation for object-token shapes at the application boundary if an immediate dependency upgrade is blocked. In particular, operator values should come from the parser's fixed operator set, and comments/patterns should reject line terminators before shell rendering.
June 9 follow-up (October 6): comment-token swallows later quotes, CVE-2026-102422 / GHSA-pqg4-j6r4-53mv¶
shell-quote 1.8.4-<1.11.0 adds a second genealogy leg to this page's original CVE-2026-9277 (incomplete-fix family). quote() emits a { comment } token as # plus its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator inside that later string ends the comment, and the remainder of the string parses as shell input:
quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#']);
// echo ok #x 'a
// id;' -> runs `id` under sh/bash/dash/ksh/zsh
The prior fix rejected line terminators in the comment's own text but not in the tokens after it, the classic incomplete-fix shape this page already tracks. Two extra durable axes beyond the original triage:
- The interaction is emission-semantics, not escaping: the comment token's meaning (swallow-to-end-of-line) retroactively unquotes everything after it. Any serializer that emits line-oriented comment syntax must treat all subsequent emitted tokens as being in comment-influenced grammar, not string grammar. Same reasoning class as the HTML-comment-sanitizer-truncation and SQL-
---appended-fragment families. parse()→quote()round-trip is a live attack route:parse()emits a comment token for a mid-word#(e.g.http://example.com/#frag), soquote(parse(untrustedCommand).concat(untrustedArg)), command-plus-argument wrapper patterns in task runners and agent tool executors, creates the comment token from untrusted input without the caller ever constructing{ comment }deliberately. Grep forquote(parse(andparse(-output-concatenation specifically, not just object-token construction.- Fix fingerprint: 1.11.0 throws
TypeErrorwhen a post-comment string token contains\n,\r, U+2028, or U+2029, version gate>= 1.8.4, < 1.11.0(the vulnerable range starts where the first fix landed). Probe with a two-token payload ({comment}+ post-token with newline +;#terminator) rather than the original single-tokenopnewline canary; a build that passes the 2026-06 canary but fails this one is the mid-genealogy version.
October 7 follow-up: Rundeck option-value cmd.exe metacharacter injection, single-quote wrapping is not quoting on Windows (CVE-2026-106056 / GHSA-jv2x-5hph-7fp2, high)¶
Rundeck < 6.2.0: free-text job option values are interpolated into commands run on Windows nodes through CLIUtils.quoteWindowsCMDArg, which wraps them in single quotes, a shell-significant character cmd.exe does not treat as quoting at all. &&, |, and friends pass straight through: a user with only job-run permission executes arbitrary commands on Windows nodes under the node-executor credential.
Durable axes for the whole command-wrapper family on this page:
- Quoting must match the target shell's grammar, not the author's shell. POSIX developers habitually reach for
'…'because it is strongest in bash; undercmd.exeit is literally a printable character. Correctcmd.exeshapes are^-escaping of& | < > ( ) ^and"-doubling inside strings (or, better, no shell at all,CreateProcessargv). Audit rule: grep any command-wrapper/JNI/job-runner codebase for'-wrapping quote helpers whose sink iscmd /c;quoteWindows*/escapeWindows*helper names containing'are the finding in one grep. - The option/parameter plane is its own injection surface in job schedulers. Job definitions get security review; option values supplied at run time flow through different code paths (UI form → API → CLI → executor string concat). On authorized engagements with a Rundeck/Airflow-class scheduler, test every free-text option with
&& calc-class inert markers (&& echo marker) on a lab Windows node, and note that the legitimate run permission is already the precondition, the finding is the privilege jump to the executor credential, so capture the node-executor identity (whoami /priv-class marker) as impact proof, never production payloads. - Cross-shell quoting differential is a reusable matrix: for each wrapper, run the same marker battery (
&&,|,`,$(),%VAR%,^, newline,',") and record which metacharacter survives for which target shell (sh/bash vs cmd vs PowerShell vs /bin/sh-on-node). A wrapper that passes the POSIX battery and fails the cmd battery is this class exactly. Sibling precedent on this wiki: theshell-quotePOSIX-operator genealogy above and the CodeIgniter/mise argument-injection pages, same invariant, different host shell. - Same-wave siblings, same invariant:
patool< 4.0.6 (CVE-2026-106057 / GHSA-73h5-w67h-9rfh), Windowsshell_quote_ntfails to escapecmd.exemetacharacters or embedded", so an archive namedreport&calc.gzprocessed withshell=Trueruns the payload; the filename is the injection plane for every archive/email/build tool that shells out per-file, and the grep is the same (shell_quote*/quote*helpers +shell=True/cmd /c). Also same-wave: GitAhead ≤ 2.7.1 (CVE-2026-106058 / GHSA-q252-mvpj-37m5) substitutes checked-out file names into clean/smudge filter commands selected via.gitattributes, so a cloned repo with a file literally named$(command)runsbash -cat checkout/stage, the malicious-repo class on this wiki's May 5 agent-git page, new GUI-client instance; and CVE-2026-106059 / GHSA-3g7h-c55x-cx2v interpolates repo filenames unescaped into macOS AppleScript ("+do shell scriptin a path → code exec on "Show in Finder"), remember third-party shells (AppleScript, PowerShell, JScript) are quoting sinks too. Lab proof for all three: disposable repo/archive with marker filenames, victim-side harness only.
October 14 09:31Z follow-up: Koha scheduler jobid → single-argument system() through Schedule::At, an unquoted atrm command string (CVE-2026-105106 / GHSA-8cv9-2m24-2x49, high 8.8)¶
Koha ≤ band: tools/scheduler.pl op=cud-delete passes the jobid request parameter to C4::Scheduler::remove_at_job without validation; Schedule::At::remove substitutes the job ID into an atrm <id> command string and executes it through a single-argument system(), which invokes /bin/sh. An authenticated staff user with only tools => schedule_tasks gets OS command execution as the web user. Fixed 24.11.20/25.05.15/25.11.09/26.05.04. Durable axes: (1) the helper library is the vulnerable layer, not the handler, the web app validated nothing because it trusted Schedule::At to build the command; when triaging a scheduler/task-runner product, fuzz ID parameters against the library's command builder, and in audits grep library code (Schedule::At, at/atq wrappers, cron writers) for string interpolation into shell calls, not just app handlers; (2) job-ID parameters are shell inputs: any "delete job N" endpoint whose backend is atrm/crontab/systemctl-via-shell accepts metacharacters, probe ID fields on scheduling endpoints with ; touch marker variants in labs (the Rundeck option-value matrix from the Oct 7 follow-up above applies verbatim); (3) same product, same wave: the reports-module SQLi leg is folded on the query-grammar page, Koha got two independent operator-plane bugs from one wave, second same-product re-sweep instance.
October 15 03:36Z follow-up: pfSense FRR status filter, escapeshellarg() output concatenated inside a single-quoted sed pattern (CVE-2026-110908 / GHSA-gv3v-jfq5-gj6p, high)¶
Netgate pfSense FRR package (pfSense-pkg-frr) 2.0.2_1 / source rev 2.1.2_1: the FRR status-page filter value is escapeshellarg()-quoted and then concatenated into a single-quoted sed expression passed to a popen() pipeline. Escaping for the shell does not escape for the sed quoting context it is dropped into, the value closes the surrounding single quote and opens shell command substitution, executing attacker-selected commands as root. Precondition is only the lowly page-status-frr WebGUI privilege. Fixed in pfSense Plus 26.07/26.03.1 and CE 2.9.0/2.8.1 packages.
Durable axes: (1) the escaper must match the innermost context, not the outer one, escapeshellarg guarantees the string is safe as a standalone shell argument; wrap its output in another layer of quotes (sed/awk/grep patterns, inline php -r, SQL fragments) and the guarantee dies. Audit grep: any escapeshellarg(...) result appearing inside literal ' or " in the command template is the shape. (2) status/dashboard filter boxes are command inputs on appliances, read-only-looking "filter" fields on network-gear status pages routinely reach popen() pipelines server-side; on authorized engagements probe every free-text filter on an appliance status page with quote-closure + $(echo marker) variants. (3) least-privilege WebGUI perm → root is the real finding, the page-status-frr-class privilege label is the report's impact anchor, same shape as the Rundeck job-run → node-executor jump above.
Notes on skipped items from this scan¶
- GitHub's updated advisory feed also surfaced Flowise entries that are already represented by existing wiki pages for Flowise RCE, credential exposure, tenant isolation, vector-store permissions, and mass assignment. They were marked processed without duplicate publication.
- Older or low-reuse updated-feed items such as withdrawn SSRF records, historical Paramiko and parser issues, generic DoS, and sparse secret-logging advisories were marked processed without standalone publication because they did not add a fresh offensive workflow beyond existing wiki coverage.
- PortSwigger Research, Trail of Bits, ProjectDiscovery, GitHub Security Blog, Disclosed, and CISA KEV had no separate new promotable delta beyond items already represented in the wiki.
October 16 09:30Z follow-up: WP Photo Album Plus ≤9.3.02.002, raw-concat value into an ImageMagick exec AND a decoder that restores percent-encoded metacharacters (CVE-2026-92115 / GHSA-2fg2-xfvj-r3qp, high 8.8)¶
The update-photo AJAX action's value parameter flows through wppa_image_magick_a() concatenated raw (no escapeshellarg()) into an ImageMagick command string passed to exec(), and wppa_decode() actively restores percent-encoded shell metacharacters (%26→&, %23→#) instead of stripping them, so payloads survive upstream filtering by arriving encoded. Authenticated with the plugin-defined wppa_upload capability (admin-grantable to low roles) → RCE as web-server user when ImageMagick is enabled.
Durable axes: (1) a decoder upstream of a sanitizer is an encoder for the attacker, if the app's input path percent-decodes after WAF/sanitization heuristics inspect the raw bytes, %26 sails past pattern checks and reconstitutes at the sink; audit rule: grep handler code for decode/urldecode/base64_decode steps positioned between validation and exec, and re-run the metacharacter battery in encoded form (%26%20%23, double-encoded %2526) whenever a plugin advertises "encoded value" storage. (2) plugin-defined capabilities hide the real privilege surface, wppa_upload is not a core role and never shows up in default-capability audits; on authorized WP engagements enumerate plugin capability definitions (add_cap/members/roles screens) and test which of YOUR lab low-priv accounts hold them. (3) ImageMagick-command concatenation is the media-wrapper cmdi class this page already canonizes (ffmpeg/whisper/pdftk singles), PHP plugins using shell-out image tooling deserve the same marker battery; lab proof with ; touch /tmp/marker-class inert payloads only.
October 16 21:32Z follow-up: ZoneMinder downloadEvents(), hand-wrapped '…' around a stored monitor Name reaches ffmpeg AND tar/zip export commands (CVE-2026-102608 / GHSA-v9cj-6fp2-33q4, critical 9.0, fixed 1.38.3)¶
ZoneMinder < 1.38.3: downloadEvents() in web/includes/download_functions.php builds the merged-export filename by manually wrapping the stored monitor Name in literal single quotes ('\''.$mergedFileName.'\'') instead of escapeshellarg(). A monitor Name containing ' closes the quote and escapes into the shell; the same stored value reaches both the ffmpeg -f concat merge command and the tar/zip archive command, so one write primitive detonates at two export sinks. Arbitrary commands run as the web-server user. Precondition is a split-role chain: a user with only monitor-create/monitor-edit permission stores the payload Name; the trigger leg needs only Events View permission to run the export. Fixed in 1.38.3 (fix commits 2de2ae44/b3a7c05f).
Durable axes:
- The
'\''.$var.'\''hand-quote-wrap is the top PHP cmdi grep. Manual single-quote wrapping breaks on a value that merely contains', one character defeats the whole "quoting" layer. This leg is the mirror image of the Oct 15 pfSense leg above (thereescapeshellarg()output was dropped inside another quoting context; here there is no escaper at all, just decorative quotes). Audit grep for both shapes together:'\\''\\.\$/'\''string-concat patterns in PHP, and anyescapeshellarg(result appearing inside literal quotes. - Split-role stored cmdi: the write permission and the detonation permission are different people. Monitor-create/edit stores the payload; plain Events-View export runs it. On authorized NVR/CCTV/scheduler engagements, treat every persisted free-text field that later names a file or command argument (device names, monitor names, schedule labels, export filenames) as a delayed shell input, and record which low permission triggers the shell leg, the trigger-permission label, not the storage-permission label, is the report's impact anchor (same least-priv-anchor rule as the Rundeck and pfSense legs above).
- When a vendor cuts one critical GHSA, go read the repo's private-advisory list, the rest of the wave is usually already there. This global-feed publication lagged ZoneMinder's own batch by ~10 days; the org advisory page carried ~30 coordinated advisories published 2026-10-06, several with operator-relevant axes: shipped default
ZM_AUTH_HASH_SECRETplaceholder is a functional, publicly known HS256 signing key with tokens verifying silently (GHSA-wmcc-x64g-jr84), probe "Change me"-class placeholders by signing a token with the shipped value and replaying it, not just flagging the default; second-order SQLi where web-tier-stored filter JSON is re-concatenated into SQL by thezmfilter.pldaemon tier (GHSA-p8h3-4x5c-cv7p), sweep any feature that persists query JSON and later re-runs it in a separate process; theview=noneexemption carved out of the auth gate stays open after the siblingisset($user)-vs-falsegate fix (GHSA-vvw3-j4p4-4rgx), enumerate gate exemptions, not just gate conditions, after any auth fix;X-Forwarded-Fortrusted on both auth-hash generation and validation (GHSA-72rf-54rm-798c, forged-original-URI/XFF family on the Sept 15 header-route page); LIMIT-clause SQLi becauseFilter::limit()returns rawQuery['limit']while a sibling call site(int)-casts it (GHSA-28mv-hqxw-qw84), safe-sibling-cast diff again. - Fix-diff commits from AI-assisted sweeps are multi-class harvest maps. The fix commit message itself enumerates every sibling fixed in one pass:
intval()on theAlarmedZoneIdfilter term (SQLi),array_map('intval')on$_REQUESTmonitor-ID lists interpolated intoIN (...)clauses,$_REQUESTarray keys reaching SQL ingetFormChanges()(fixed with/^[a-zA-Z0-9_]+$/key validation, remember keys as injection plane, not just values), MIME fields viadbEscape()/intval(), andescapeshellcmd()→escapeshellarg()swap indeletePath()'srm -rf(the classic wrong-escaper pair:escapeshellcmdescapes metacharacters around the whole command, leaving argument-breakout;-class shapes reachable in concat templates). One commit = five audit greps. Reporter/co-author fingerprints (AI-swept advisory validated by Ada Logics; commit co-authored by an LLM) mark these vendor batches as harvestable: the fix band tells you the fuzzing input shapes. Lab proof: disposable ZoneMinder instance, marker-name monitor (a';touch /tmp/zm-marker;#-class inert), own-account export trigger only.
October 20 18:30Z follow-up: launch-editor, escapeCmdArgs() quotes cmd.exe but omits %, so environment-variable and CMDCMDLINE expansion survive (CVE-2026-112943 / GHSA-698v-4r3x-3vcv, medium, fixed 2.14.2)¶
launch-editor (the dev-server "open in your editor" helper used by webpack-dev-server/Vite-class tooling) must pass file paths as cmd.exe arguments for .bat/.cmd invocations and hand-rolls an argument escaper, which covers cmd metacharacters but not %, the environment-variable/CMDCMDLINE expansion sigil unique to cmd.exe. Three lab-proven shapes from the advisory: (a) attacker-injected env var containing &calc.exe invoked as something%ENV%; (b) NTFS alternate data stream named ~-38%calc.exe invoked as something %CMDCMDLINE:~-38%calc.exe (substring expansion of the command line itself); (c) a filename containing %CD% + payload invoked as ./%CD%. The existence-check on filenames gates nothing, all three ride legitimate-looking paths.
Durable axes: (1) % is a metacharacter in cmd.exe that POSIX reflexes miss, every escaper written by a sh/bash developer for a Windows sink gets a %VAR%, %CMDCMDLINE:~n,m%, and %CD% battery in addition to the & | ^ " set (extends the cross-shell quoting matrix rule above with the expansion plane, which is not an operator plane at all and survives most operator-only filters). (2) CMDCMDLINE substring expansion means the injection can be self-referential, the payload lives in an ADS filename and the argument merely slices it out of the command line; when auditing Windows wrappers, test whether attacker-influenced filenames appear in the same command line as the escaper's output. (3) Dev-tooling angle: any editor-launch/env-hygiene boundary in a dev server on a shared Windows workstation is a local-privesc-adjacent probe with marker payloads only.
October 20 20:0xZ follow-up: launch-editor second and third legs, editor-native +cmd argument grammar survives every path escaper, and a Windows ..:1:1 spelling defeats the existence check outright (CVE-2026-112944 / GHSA-r825-w8mm-5pxw, CVE-2026-112942 / GHSA-587h-7wmj-h5pm high)¶
Same library, same evening, two more legs completing the chain:
- Editor flag grammar (r825):
launchEditor(file)passes an existing path as-is, and editors parse leading--/+arguments as commands, Vim treats+as an Ex command, so a directory literally named+call writefile(["MARKER"],"LAUNCH_EDITOR_MARKER")|qa!executes inside the user's editor session (file overwrite/RCE-class) with no shell involved at all. Affected editors: Vim/gVim, MacVim, Emacs/emacsclient, Notepad++ plugin-message surface. Vite/WSL users inherit it because the first-argument position is preserved across WSL invocation. - Existence-check bypass on Windows (587h): the
fs.existsSync(fileName)gate that was the sole precondition for the class is itself bypassable, a crafted path ending\..:1:1passespath.resolve()(final component..:1:1isn't a parent-dir segment), thenlaunch-editorstrips:1:1as a line:column suffix leaving a path ending\.., which WindowsexistsSync()resolves to the existing parent even though the attacker-named component never existed. The file-creation precondition disappears, and combined with the%leg above this is full command injection with an attacker-controlled file argument.
Durable axes: (1) the argument grammar of the FINAL consumer is part of the injection surface, escaping for cmd.exe or POSIX shells misses that Vim/Emacs have their own command language reachable through argv (+cmd, -e); any "launch X with this filename" wrapper needs the target app's flag battery, not just shell metacharacters. Audit grep: wrappers that pass user-influenced paths positionally to interpreters/editors/players. (2) Parser-stack suffix conventions are bypass material: :line:column stripping in one layer + .. handling divergence between Node path.resolve() and Win32 path semantics = an existence check that verifies a different path than the one forwarded, the validate-target-vs-operation-target invariant again, with the multi-layer normalization-differential probe: append :1:1, \.., ..: variants to any gated path and diff what the gate resolves vs what the consumer receives. Lab proof: disposable repo, marker +call writefile(...) directory, own editor session only.
October 27 21:04Z follow-up: Atlantis, raw.Project.Validate() rejects .. / \ but not shell metacharacters, then strings.Join(args," ") into sh -c completes the chain (CVE-2026-116676 / GHSA-rjh2-4xgw-p2hj, high 8.8, verified at 92ce5c51)¶
Atlantis passes the Terraform workspace value taken from a pull request's atlantis.yaml into a shell command with no quoting. The chain, verified against upstream main:
server/core/config/raw/project.govalidates the workspace by rejecting only..,/, and\,;,#,$, whitespace, and redirections survive.workspace_step_runner_delegate.goappendsctx.Workspaceas a plain argv element:[]string{workspaceCmd, "select", ctx.Workspace}.terraform_client.goflattens the argv array withstrings.Join(args, " ").- The same file executes it as
exec.Command("sh", "-c", tfCmd).
A workspace of poc;id;false;# therefore runs terraform workspace select poc;id;false;# under a shell, as the Atlantis service account, whose environment commonly holds cloud-provider, Terraform, and VCS credentials. No allow_custom_workflows, no custom workflow, and no apply permission required, pull-request eligibility for plan is the whole precondition.
Durable axes:
- The argv array is the last safe representation, and
strings.Joindestroys it. Any wrapper that builds[]stringand then joins beforesh -chas removed the protection its own data structure provided. Audit grep, in order:exec.Command("sh", "-c"/bash -c/cmd /c, then walk backwards forstrings.Join/.join(" ")/+ arr.joinon the argument vector. Correct shape keeps argv intact and never invokes a shell. Same invariant as the day's launch-editor legs: quoting is only as good as the layer that still knows where each argument begins. - Character deny-lists on identifiers are not shell safety. This validator blocks path traversal (
..,/,\) and therefore reads as "input validated" to a reviewer, while blocking none of the metacharacters that matter to the sink it feeds. When a repo validates a name, record exactly which characters are rejected and diff against the target shell's operator set, the missing characters are the finding. This is the same validate-target-vs-operation-target drift as the Oct 27 21:04Z FileBrowser leg, applied to syntax instead of paths. - IaC/CI control planes turn contributor-authored config into code execution with no elevated permission.
atlantis.yaml,workspace,apply_requirements,repo, andterraform_versionare all pull-request-controlled. On authorized assessments of Atlantis/Luna-class plan-and-apply bots: plant an inert metacharacter marker in a disposable repo workspace name, confirm detonation from a plan only, and record that the process environment (not just the checkout) was reachable. Never touch real cloud credentials or apply anything; presence of the joinedsh -csink plus a surviving;is the proof. Reporter fingerprint to reuse: they cited the exact upstream commit, check whether the vendor's "planning untrusted Terraform is already dangerous" framing holds, since the distinct claim here is credential-bearing environment access without apply rights.
November 10 follow-up: AG2 SandboxShellTool, newline as statement separator defeats allowed=[...] and readonly=True, and the "sandbox" was sh -c on the host¶
GHSA-2h4w-29cv-2cmv / CVE-2026-113663 (high, AG2 agent framework): both restricted modes of SandboxShellTool, explicit allowed=[...] prefix allowlist and readonly=True (READONLY_COMMANDS), are enforced by a filter that screens single-line shell metacharacters, while execution runs the raw string through sh -c, where an embedded newline is exactly ;. So ls\nid sails through. With the default LocalEnvironment() backend (its own docstring: "Commands run via subprocess on the host, so there is no real isolation") that's full host execution, triggerable by prompt-injected content steering the agent.
Operator rules for every agent-tool allowlist on this page's list: - Separator vocabulary must match the executor's grammar. ;, |, &&, backticks, $() are the obvious set; \n (and \r\n on some shells), \<newline> continuation, and quoted-newline variants are the classic misses. Test the full printf 'ls\n<TOUCH-MARKER>' shape against every allowlisted-tool wrapper, not just the semicolon spelling the CVE mentions. - Validate-target vs execute-target diff, again: filter sees command, executor sees raw command, same parameter pair, different transformation state (post-decode vs raw, this is the Sunhillo %0a rule relocated to the agent plane). - Backend-identity check before trusting the word "sandbox": grep the tool's environment class (LocalEnvironment vs container backend); a prefix-filtered host subprocess is not a sandbox, and the advisory's own docstring quote is the evidence to cite in reports. - Reporting heuristic: when the vulnerable component is the agent's own tool, the attacker's trigger is usually prompt injection via repo content, tool output, or fetched pages, include the injection leg in scope, not just the filter bypass.
November 12 follow-up: Data::Dump::Streamer, the eval-round-trip serializer that wrote unescaped $/@ into qr literals, so restored dumps execute Perl (CVE-2026-126673 / GHSA-h6p6-jc3j-2qf8, Data::Dump::Streamer < 3.00)¶
Perl's Data::Dump::Streamer serializes a Regexp by splicing its pattern text into a qr literal in the generated dump. Two escaping failures in _dump_qr, per the advisory: (1) $ and @ in the pattern are not escaped, so a pattern containing @{[ ... ]} or ${\ ... } interpolates as code when the dump is later restored with eval/do; (2) an already-backslash-escaped delimiter in the pattern gets a second backslash, which leaves the delimiter bare and terminates the qr literal early, exposing the remainder of the payload to the surrounding eval. The attacker controls the regex pattern at compile time; the code runs at restore time. Any application that compiles, dumps, and later eval-restores attacker-influenced regexes (config stores, cached state, session/queue dumps, plugin manifests) gets Perl execution on restore.
This is this page's core invariant relocated from shell quoting to code generation: the quoting layer must know the target language's full interpolation and delimiter grammar, and double-escaping is as broken as under-escaping. The qr literal is a mini-shell: sigils are the metacharacters, the delimiter is the quote character, and eval is the sh -c.
Operator rules:
- Enumerate eval-round-trip serializers, not just shell wrappers. Audit grep per ecosystem: Perl
Data::Dump::Streamer+eval/doon its output (andStorablefile paths for the typed-deser sibling class), Pythonrepr()/ast.literal_evalvsevalon pickled-ish dumps (theyaml.loadround-trip family), RubyMarshalvseval(Marshal.dump...)patterns, JS customtoJSON-stringify-then-evalrevivers. The vulnerability lives wherever a string field is spliced into generated source, not where the type is guessed. - Interpolation-sigil battery per serializer. For any string-bearing type (regex, identifier, filename, key), feed every sigil/interpolation spelling the target language honors inside the chosen quote context: Perl
qr=@{[}${\$plus delimiter variants on every legalqr{...}/qr(...)/qr|...|delimiter; Python-ish repr contexts = quote/backslash/newline variants. Prove in a lab REPL: dump a crafted value, inspect the generated text for a bare delimiter or unescaped sigil, and restore only against a marker (no shell payload). - Double-escape probe. If the escaper unconditionally prefixes a backslash to special characters, feed input that already contains the escape (
\/,\",\\) and diff generated-vs-intended literal. The second backslash unescaping the delimiter is the exact bug shape here, and it generalizes to any escaper that escapes without consulting what the input already contains (sibling of the Oct 16 WP Photo Album percent-decode-then-exec decoder drift legs on this page). - Trigger-vs-sink separation is the report's weak leg. Like the Atlantis leg above, the library bug is necessary but not sufficient: the app must actually
eval/dothe dump with attacker-influenced pattern material in scope. In reports, show the generated-dump text with the bare delimiter visible and identify the restore call site; without the restore sink, claim library exposure only.
November 18 2026 follow-up: @augment-vir/node grep(), the double-quote escaper that never escapes the one field where $() matters (CVE-2026-63496 / GHSA-xvcc-vqjv-phqh, high, @augment-vir/node < 31.73.5)¶
A clean, fully-PoC'd instance of this page's core invariant in a mainstream npm utility library. grep() builds a shell command string and inserts each caller-supplied search pattern as -e "${searchPattern}" (grep.ts:310), then hands the whole string to spawn(command, { shell: 'bash' }) (shell.ts:98-99). Bash evaluates $(...) inside double quotes before grep ever runs, so grep({ pattern: '$(touch /tmp/sentinel)no-match' }, ...) executes the substitution. The fix (31.73.5) single-quotes via a proper shellQuote and adds --, or bypasses the shell entirely with spawn('grep', args, { shell: false }).
Three details sharpen the audit rules already on this page:
- The escaper existed and was applied to the wrong fields.
grep.tshas anescape()helper (double-quote escaping + newline removal) that is applied toexcludePatterns,excludeDirs, andincludeFilesbut not tosearchPatterns. When auditing any shell-string builder, build the parameter-by-parameter escaping decision table first: which caller-controlled fields get the escaper, which skip it, and which flow to the same command string anyway. A helper in the file is not coverage; the advisory's data-flow table (sourcegrepSearchPattern.patterns→ sink-e "..."→runShellCommand→spawn shell:'bash') is the evidence shape to reproduce in reports. - Double-quote escaping is never sufficient, even when applied. Even for the fields that do get
escape(),\"escaping does not stop$()or backtick substitution inside a bash double-quoted context. Safe forms are exactly two: POSIX single-quoting ('\''re-quote idiom) or no shell at all (argvarray +shell:false). Any escaper whose output still sits inside"is a finding by inspection. - Library API surface = downstream apps' injection surface.
grep()is exported from the package main entry, enabled by default; every app that maps request input topatterninherits RCE as the Node user. Hunt greps:spawn(.*shell/exec(combined with template-literal-built command strings in node_modules utilities, and for this package specifically@augment-vir/nodegrep(with untrustedpattern/patterns. The advisory's local-Docker PoC (sentinel file under/tmp, no network, pattern that matches nothing so the injection fires independently of results) is the replay harness; run it against 31.73.2 vs 31.73.5 for the version differential.
November 23 follow-up: AVideo API, the sanitizer existed two lines above and every caller ignored it, raw decrypted JSON fields spliced into ps | grep '<keyword>' pipelines (CVE-2026-63492 / GHSA-j44m-77cc-p3cc, high, fixed 29.1.0)¶
AVideo's plugin/API/standAlone/ endpoint family has a textbook-sanitized helper that no caller uses. listFFmpegProcesses($keyword) in functions.php builds ps -eo pid,etime,%cpu,%mem,cmd | grep '[f]fmpeg' | grep '$keyword' by interpolating $keyword inside single quotes with no escaping and runs it through exec() (/bin/sh -c). The caller in ffmpeg.json.php does build a clean value ($keyword = preg_replace('/[^a-zA-Z0-9_-]/', '', $codeToExec->keyword)), but the two reachable modes (list and isKeywordRunning) pass the raw decrypted $codeToExec->keyword / $codeToExec->isKeywordRunning to the helper instead of the sanitized variable. Payload x'; touch /tmp/marker # closes the single quote and runs as the web-server user. Both modes also skip the $isStandAlone gate that guards the sibling deleteFolder/deleteFile modes, so they fire on any AVideo instance. Fixed 29.1.0.
Durable axes:
- A sanitizer in the file is a fingerprint, not coverage; enumerate call sites of the sink helper, not presence of the regex. The
preg_replaceallowlist one screen above the raw interpolation is the strongest possible "looks reviewed" signal, and it was dead code on the reachable path. Audit rule: for every function that interpolates into a shell string, list all callers and diff which argument each passes, sanitized local vs raw request/decrypted field. The@augment-vir/nodeleg above had the same shape (escaper applied to 3 of 4 fields); here the sanitized variable exists in the same caller scope and is still not the one forwarded. Report evidence shape: side-by-side of thepreg_replaceline and the rawlistFFmpegProcesses($codeToExec->keyword)call line. - Mode/operation switches gate unevenly, enumerate gate coverage per mode.
deleteFolder/deleteFilerequired$isStandAlone;list/isKeywordRunninghad no gate at all. On anyswitch($mode)/actiondispatcher, build the (mode x gate x sink) decision table; modes that read are routinely forgotten when gating destructive ones, and a read-mode that shells out is still an RCE. Probe every mode value on authorized engagements, not just the obviously dangerous names. - Encryption-as-authentication means the payload is client-constructed, so crypto material is the real precondition. Reachability requires a valid encrypted
codeToExec(AES-256-CBC, key =sha256(saltV2), IV in the envelope) plus a validAPISecret. That is this page's fuzz-the-key-before-the-algorithm rule applied to reachability scoring: the injection is unauthenticated-but-encrypted, so enumerate what fixes the salt (shipped defaults, reinstall-stable values, dumps in config/backups) before accepting the vendor framing that "an attacker must already hold the secret." Treat the encryption layer as a credential check, never as a sanitizer: the decrypted JSON crosses into the shell verbatim, and quote-closure works identically once the envelope is valid. Lab proof: build your own envelope from a test instance's config, marker payload only (; touch /tmp/av-marker; #-class inert), single instance you control. ps | greppipelines are shell sinks hiding as inventory helpers. Process-listing helpers in media/streaming panels (ffmpeg/whisper/pdftk class already canonized on this page) almost always interpolate a search term into agrep '…'segment. Grep for| grep '/grep "$/ps -eocombined withexec(/popen(/system(; the bracket-trick[f]fmpegthat defeats self-matching tells you a human thought about this pipeline and still did not think about the attacker.
November 24 follow-up: Pelican pelican-import, the WordPress post slug that survives into a Pandoc command line run with shell=True (CVE-2026-122090 / GHSA-5g2c-49cg-fxh2, high, 4.12.0)¶
pelican-import takes wp:post_name (the post slug) from a WordPress XML export, uses it to build the output filename, and interpolates that filename into a Pandoc command passed to subprocess.call(..., shell=True). On POSIX, command substitution inside the slug evaluates the moment a user imports the crafted export: a slug like x$(touch /tmp/pelican-marker) runs as the importing user. Full report: Fluid Attacks advisory, sink at pelican/tools/pelican_import.py (4.12.0).
Why this earns a place on this page:
- Importers and converters are shell sinks hiding as file writers. The attacker never types a command; they author content (a slug, a title, a filename field) in an interchange format (WXR, CSV, EML, DOCX, model files) whose value the tool later re-serializes into a filename and then a command string. Audit shape for any
*-import,*-convert, or export tool: grepshell=True/os.system/subprocesswithshell, walk backwards through filename construction, and check whether the name component came from the document rather than the CLI user. - The trigger's social leg is the report's reachability claim. Detonation requires a victim to run the import, so on authorized engagements price this as malicious-file-delivery RCE (phish-the-analyst class, same posture as the Wfuzz report sink), and demo with a disposable export + sentinel file, never against a colleague's machine.
- Slug-like fields deserve an explicit metacharacter audit because they look pre-sanitized. WordPress slugs are lowercase-hyphen in the UI, but the XML import path trusts the file's value outright; validate-where-shown vs consume-where-imported is the validate-target-vs-execute-target invariant again, with the importer as the unguarded second entry point (sibling of the AVideo mode-gate leg above).
November 25 follow-up: AVideo standAlone ffmpeg again, the completion hook splices raw notifyCode and callback next to one escapeshellarg (CVE-2026-63305 / GHSA-g9x9-q7qj-6mv5, high)¶
Same endpoint family as the November 23 leg, one screen over. plugin/API/standAlone/ffmpeg.json.php builds a shell command for nohup sh -c, and when the decrypted codeToExec yields a non-empty avideoPath it appends a completion hook && php <script> notify=<escaped-json> notifyCode=<...> callback=<...>. notify goes through escapeshellarg(); notifyCode and callback are concatenated raw, from the same attacker-controlled decrypted object as the (denylisted) ffmpegCommand, and neither passes sanitizeFFmpegCommand(). Shell metacharacters in either field execute as the web-server user.
Durable reading:
- Escape coverage is per-field, so enumerate every field spliced into the same command line. The fix hardened the one field the advisory named (
ffmpegCommand) and left its two neighbors in the same interpolated string unescaped. When auditing any patched sanitizer commit, diff the fields flowing into the sink before vs after, and test adjacent fields the patch never mentioned. This is the "sanitizer two lines up, callers ignore it" rule from the November 23 entry, now with the sanitizer partially applied, the more dangerous shape because the escaped field is evidence someone thought about the line. - A denylist tuned for one grammar is not a shell guard.
sanitizeFFmpegCommand()strips ffmpeg-flavored metacharacters for the command field only; the completion hook needs shell escaping, not ffmpeg filtering. Same command string, two languages (shell wrapping ffmpeg), one sanitizer: ask per-field which language the value crosses and which escaper matches that language.