The mechanism has three parts. A subprocess invocation constructed as a list of pre-tokenized arguments. An attacker-controlled value placed in a positional slot without a preceding end-of-options separator. A receiver binary whose own argument parser classifies list elements by their leading byte rather than by the caller's intent.
The list form is a correct, complete defense against the POSIX shell. The shell's job is to tokenize a command string into the argv the operating system will receive. When the application constructs the argv itself, the shell has nothing to tokenize; execve takes the array verbatim and the receiver sees exactly the tokens the caller assembled. Shell metacharacters inside a list element remain as literal bytes in that element, and the receiver reads them as bytes of a filename, a branch name, or a URL. The entire class of CVEs that end with ; rm -rf / inside a backtick, a subshell, or a command substitution closes against this form.
The receiver is the next parser in the chain. For git, that parser is getopt-style: the first byte of each list element is checked against -, and if it matches, the token's interpretation flips from "positional argument of the current subcommand" to "option whose name is parsed until the next = or whitespace." git's manual enumerates options with side effects that reach outside the parse. --upload-pack=<program> runs the named program as the pack helper on local and SSH transports. --exec=<program> sets the remote shell on git push. --config writes to the per-invocation configuration. An attacker-controlled value whose first byte is - presents to git as one of those options. The call site's intent that the value be a commit SHA, a branch name, or a URL is not an input to git's parse; the value's first byte is.
In each live exhibit of this class the author had completed the migration the language's documentation recommends and read the migration as the threat model's complete defense. Prefect's GitRepository (CVE-2026-5366) stores commit_sha and directories verbatim and places them into ["git", "fetch", "origin", self._commit_sha], ["git", "checkout", self._commit_sha], and ["git", "sparse-checkout", "set", *self._directories]. The 3.6.25 patch closes the commit_sha path with a value-shape predicate (re.match(r'^[0-9a-fA-F]{4,64}$', commit_sha)) and the directories path with the structural -- separator (['git', 'sparse-checkout', 'set', '--', *self._directories]) plus a UserWarning. The same diff applies two different defenses to two different paths; the fact that both defenses existed in git's own documentation years before the CVE is the signature of the class. degit (CVE-2026-11572) ships the same shape on the same binary six weeks after its own migration from child_process.exec to child_process.execFile. PR #410 converted the ls-remote and clone call sites to argv-list form, foreclosing /bin/sh -c evaluation of the attacker-controlled user capture. PR #429, six weeks later, added the end-of-options separator to the ls-remote call: ['git', 'ls-remote', '--', repo.url]. The first patch read the migration as complete. git's getopt parser kept running.
The fix family is two primitives, both documented in the receiver's own manual. The structural primitive is the receiver's end-of-options separator (typically --, standardized by the POSIX utility syntax guidelines and present in GNU getopt, Python's argparse, Ruby's OptionParser, Go's flag, and most CLI frameworks that read from argv). Inserted into the list before any attacker-controlled positional slot, it instructs the receiver's getopt loop to stop option parsing and treat every subsequent element as a positional regardless of its leading byte. The semantic primitive is a value-shape predicate at the point the value becomes attacker-controlled: a strict allowlist of value shapes (an anchored hex regex for commit refs, a scheme and host allowlist for URLs). Either primitive closes the class at one call site. Neither closes it at the sibling call site in the same module.
This pattern distinguishes itself from The Shell Was Not The Sink at the presence of a sanitizer function. That pattern requires a named sanitizer function (escapeshellarg, htmlEncode, OracleCodec) whose name encodes an interpreter the destination is not; the signature at the fix is often a renamed function. This pattern has no sanitizer function at the call site. The defense is a structural choice (list form, execFile, spawn with an array) that forecloses one interpreter by not running it, and the destination is the receiver whose own parser runs regardless. From Quote Wrap Is Not Escape at the primitive the developer reached for: that pattern is typed quote bytes substituting for a function call; this pattern is a structural form substituting for consideration of the receiver's grammar. Both patterns share the shelf of "the mechanism the developer chose addresses an interpreter different from the sink the attacker's bytes reach."