//nefariousplan

Convention Is The Allowlist

A specification, RFC, or framework convention implies that an attacker-controllable field takes one of a constrained set of values, by how the spec exercises the field elsewhere rather than by formal grammar. The implementation parses the field at its broad syntactic type and accepts everything the type permits. The implicit allowlist exists in the spec authors' heads and in downstream consumers' assumptions; the code never installed it. The patch closes the demonstrated chain by narrowing the value set against the immediate context; the set of accepted values remains whatever happens to be supported by the surrounding subsystems today.

A specification describes a field by exercising it. The examples pass three values; the schema grammar admits two hundred; the prose paragraph two lines above the diagram narrows the range to twenty-one. The constraint lives in the way the spec uses the field across its text. It does not live in a formal grammar the implementation could compile against.

The implementation parses the field at its broad syntactic type and accepts everything the type permits. The implicit allowlist exists in the spec authors' heads and in downstream consumers' assumptions about what reaches the sink. The code never installed it. The runtime trusts whichever bytes the syntactic type admits; the convention was the only thing that ever narrowed them.

The patch closes the one chain the researcher demonstrated by narrowing the value set against the immediate context: the arithmetic the value touches, the subsystem it flows into, the quoted form a sibling parser's grammar happens to admit. The set of accepted values after the patch is whatever the surrounding subsystems happen to support today. The next change to those subsystems reopens the class.

Mechanism

Three layers participate in every exhibit. The project's code owns one of them.

The first layer is a specification that defines a field. The definition is written in prose, encoded in examples, enumerated across the sections of the document that use the field, and recognized across the community of downstream consumers that read the document. RFC 2181 §5.4.1 describes which DNS records a resolver may cache by zone of authority (Netty CVE-2026-47691). RFC 6716 §3.2.5 constrains the Opus frame-count M to the integers 1..48 (GPAC CVE-2025-55658). RFC 4252 §6 reserves message numbers 80 and higher for the post-authentication connection protocol (Erlang/OTP CVE-2025-32433). RFC 9110 §9.2.1 names GET, HEAD, OPTIONS, and TRACE as safe (read-only) methods (Nezha CVE-2026-49396). OIDC Core 1.0 §16.8 forbids alg: none for ID tokens (SimpleHelp CVE-2026-48558). RFC 1572 defines NEW-ENVIRON with USER as a well-known variable name the server consumes as a username (inetutils CVE-2026-24061). The spec constrains the value set by how it exercises the field across its text. The wire grammar it specifies is broader than that narrative constraint, every time.

The second layer is the grammar the specification's own wire format defines. RFC 1035 admits any question name as bytes. The Opus code-3 header reads M as a six-bit field whose mask admits 0..63. The SSH binary-packet layer admits any message number in a byte. HTTP admits any method token. JWT admits any alg string. A JSON path admits any string in a map key. A libpq dbname argument admits any conninfo-shaped string. A git ref position admits any argument the receiver's own argv parser does. The grammar accepts the full syntactic type; the convention narrows it in the authors' heads.

The third layer is the implementation. Every exhibit parses at the grammar's broad type and uses the result at some sink without ever narrowing it to the spec's set. Netty's AuthoritativeNameServerList.add implements RFC 1035 wire decoding and treats a suffix-of-the-question-name test as the effective bailiwick check. GPAC's Opus parser reads M as data[header->size] & 0x3f and walks straight into a modulo and a divide. Erlang/OTP's ssh_connection:handle_msg/4 dispatches on the message's record type via pattern-match clauses with no guard on the #ssh{authenticated} field the userauth subsystem maintained in the same record. Nezha registered its cron manual-trigger as auth.GET(...) and the SameSite=Lax cookie waved cross-origin GETs through. Kysely's .key() takes K extends string at the TypeScript boundary and lets the runtime JSON path parser treat ., [, ], *, and ? as structural (Kysely CVE-2026-44635). Splunk's PostgreSQL sidecar handler builds pg_dump -h localhost ... <database> with <database> taken verbatim from a JSON field, encoding the developer's mental model in the hardcoded -h localhost flag and the implicit constraint on what <database> can be (Splunk CVE-2026-20253). Prefect's GitRepository.__init__ accepts commit_sha at the broad type str and stores it verbatim; the receiver downstream is git, whose option parser reads any argv element beginning with - as a flag (Prefect CVE-2026-5366).

The pattern's distinctive signature is the patch. The researcher's chain is closed by narrowing the value set against the one context the patch author happened to study. Netty 4.2.15 compares the NS owner against the question name as a dotted suffix. GPAC guards each divide with nb_frames ? and leaves the function returning success on the entire reserved range M=49..63. Erlang/OTP inserts one earlier handle_msg clause that disconnects when authenticated = false. Nezha flips two routes from GET to POST. Kysely wraps the member key in .". . ." so today's quoted-key parsers across MySQL, Postgres ->$, and SQLite treat the metacharacters as literals. Prefect installs a hex regex at the constructor and leaves the other interpolated fields untouched. Each narrowing closes the demonstrated chain. None installs the spec's constraint. The set of accepted values after the patch is whatever the surrounding subsystems happen to support today, and the next change to those subsystems reopens the class for the new value.

The failure repeats because the specification and the parser cannot share a representation. The spec's constraint is in prose. The parser needs a grammar. Compilers are translators between formal objects; the convention never leaves human language. Downstream consumers read the spec and assume the parser installed what the spec narrated. The parser reads the wire format and installs what the grammar admits. The two were never speaking about the same set.

Exhibits

CVE-2026-20253: Splunk Hardcoded `-h localhost`. The `database` Field Is A libpq Connection String.. CVE-2026-20253 is the libpq-conninfo instance of the pattern. The PostgreSQL convention that dbname is a database identifier is documented in the same libpq chapter that documents the conninfo grammar; the conninfo grammar is the part that admits host, hostaddr, port, user, password, and passfile. Splunk's PostgreSQL sidecar handler builds pg_dump -h localhost ... -Fc <database> with <database> taken from a JSON field of the same name, encoding the developer's mental model in the hardcoded -h localhost flag and the implicit constraint on what <database> can be. The 10.0.7 / 10.2.4 patches close the demonstrated chain by adding an authentication gate at the proxy; the handler's last positional argument still receives the request's database field, and libpq still parses what it finds. The implicit allowlist (database identifiers on the local Postgres) lived in the same source line as -h localhost and was never installed in libpq's parser.

CVE-2026-24061: The CVE Names One Variable. The Patch Sanitized Seven.. The protocol-environment-variable instance. RFC 1572 (1994) defines NEW-ENVIRON with USER as a well-known variable name, and every Telnet handshake since has treated "send USER over the wire so the server can autologin you" as the convention. The convention lives entirely in spec prose. inetutils' Telnet server parses NEW-ENVIRON at the byte-string syntactic type, copies whatever arrives into the process environment, and lets _var_short_name's %U arm hand that string to the login template as a bare token. The CVE-2026-24061 patch narrows %U against shell-meta and leading--, but the same template also expands %h, %l, %L, %t, %T, and %u from network-influenced sources; Simon Josefsson's follow-up commit extracts a shared sanitize() and applies it to all seven, and a third commit adds -- to the login invocation. The named CVE fixes one switch case. The actual repair acknowledges that the entire "USER means username" convention had been load-bearing across the whole expansion subsystem, and the patch makes that explicit only where the input filter previously made it implicit.

CVE-2025-32433: Erlang/OTP's SSH Server Tracked Authentication. The Dispatcher Never Read the Field.. CVE-2025-32433 is the protocol-state instance of the pattern. RFC 4252 section 6, published January 2006, says messages numbered 80 or higher are reserved for the post-authentication connection protocol and a server receiving them before authentication completes MUST disconnect. The allowlist lives in the RFC's prose, not in any formal grammar the implementation can compile against. Erlang/OTP's ssh_connection:handle_msg/4 dispatched on the message's record type via pattern-match clauses, with no guard on the #ssh{authenticated} field the userauth subsystem maintained in the same record. The dispatcher's pattern-match clauses were the effective allowlist: any message record the module destructured was accepted in any state. The April 14 2025 patch closes the demonstrated chain by inserting one earlier handle_msg clause that disconnects when authenticated = false, narrowing the accepted set against the immediate context (server-side, unauthenticated) without making the phase grammar explicit at every clause. The set of messages a future maintainer's new handle_msg clause introduces will still pattern-match through the dispatcher; the new gate above them holds because pattern-match evaluation order, not the dispatcher's schema, now carries the security model.

CVE-2026-5366: Prefect's GitRepository Skipped The End-Of-Options Separator The Same Patch Added One Function Down. The commit_sha half of CVE-2026-5366 is the Git-refspec instance. Every git porcelain command since the early transport refactor accepts a commit SHA whose conventional shape is a hexadecimal string of 4 to 64 characters, with the shape exercised across gitrevisions(7), the manpages, the test suites, and every codepath that ever produces a SHA value. Prefect's GitRepository.__init__ accepted the field at the broad syntactic type str and stored it verbatim. The implicit allowlist (hex SHAs) lived in every git user's head; the code installed it in the 3.6.25 patch as re.match(r'^[0-9a-fA-F]{4,64}$', commit_sha) with a ValueError rejecting anything else. The narrowing applies at the constructor only; the _clone_repo and pull_code call sites continue to interpolate whatever survives the regex into their argv lists, and any future field that becomes attacker-controlled in those positions reopens the receiver's option grammar without touching the constructor.

Boundaries

Not every documentation-as-security instance is this pattern. Internal Only By Convention is the sibling where the convention describes who is permitted to write a channel; the field's trust source is the implicit allowlist. Convention Is The Allowlist describes the implicit allowlist on the values the field may carry once it has been written. The two often appear together on the same input, each describing a different layer of the gap.

Not every narrower-filter-than-sink instance is this pattern. Gate Narrower Than Sink describes two matchers that both exist in code, written to describe the same syntactic object, that disagree at some bytes. Convention Is The Allowlist describes the case where the narrower matcher was never written at all; the spec's constraint lives entirely outside the project's repository. If both a gate and a sink have grammars in the code, the defect is in the grammar-pairing and the gate-narrower-than-sink shape applies.

Not every unsafe default is this pattern. Safe Mode Was Opt In describes libraries that expose a safety primitive the caller must engage: a flag, a constructor overload, a factory setter. Convention Is The Allowlist describes the absence of the primitive altogether: no flag on the parser's API, no overload on the constructor, no setter exists that would install the spec's constraint. The fix for Safe Mode Was Opt In is to pass the argument. The fix here is to write the check.

Not every medium-assumed-safe bug is this pattern. Closed Network Assumed is the specific case where the implicit allowlist is the trust properties of the transport bus (the CAN wire, the internal VLAN, the Unix-domain socket, the PCIe link). Convention Is The Allowlist is about field values the spec's language narrates, not about the trust of the transport. A bus-trust bug whose fix adds bounds checks is Closed Network Assumed. A field-value bug whose fix installs an RFC's enumerated set is this pattern.

Defender playbook

Enumerate the non-grammar constraints in the specifications your parser reads against. For every attacker-controllable field, find the spec paragraphs that exercise the field elsewhere, the examples that constrain its range, the sections that reserve values for particular phases, and the RFC references that narrow its shape. Each paragraph is an invariant the parser does not install. Each invariant is a line item on the inventory the auditor hands the maintainer. The output of the exercise is a list of constraints that live in English and need to live in code.

At every call site that reads an attacker-controllable field at the broad syntactic type, install the constraint the spec narrates rather than the one the current downstream subsystem happens to admit. "The NS owner must be at or below the responder's bailiwick" is the constraint. "The suffix test the current implementation performs" is the leak. The check belongs as close to the parser as the type permits, with the full allowed set declared as a named constant the next maintainer can read without reading the RFC.

Test the parser against values the type admits and the convention excludes. For RFC-declared integer ranges, feed the reserved values at the boundary and in the middle, and assert the function rejects them at the parser, not that a downstream arithmetic guard catches zero. For auth-phase protocols, send post-auth messages pre-auth and assert the dispatcher disconnects before any record-type clause matches. For spec-enumerated algorithm sets, submit the values the spec forbids (alg: none, retired ciphers, empty algorithm strings) and assert rejection ahead of any lookup table. The regression test's name should be the sentence the spec paragraph contains.

Read the patch diff for whether the constraint has moved from the spec into the code. If the patch narrows against "the arithmetic the value touches," "the interpreter the value flows into," or "a sibling parser's today," the class is still open and the next downstream change is the next CVE. If the patch sets the accepted value set to the spec's enumerated set at the parser's boundary, the class closes. Netty 4.2.15 and Prefect 3.6.25 are the two shapes of the same choice: one narrowed to the immediate context, one installed the spec's allowlist at the boundary.

Kinship

Internal Only By Convention. Sibling class at a different enforcement layer. Both describe gaps where a convention held in documentation never compiles into a check. Internal Only By Convention names the trust source: who is permitted to write a field. Convention Is The Allowlist names the value set: which values a written field may carry. Many codebases exhibit both patterns on the same input; auditing one often surfaces the other on the next line.

Gate Narrower Than Sink. Cousin. When the spec's constraint has already been written into a check and the check disagrees with a downstream matcher, Gate Narrower Than Sink names the mismatch. Convention Is The Allowlist is the precursor state, where no check was written at all. A patch under this pattern that installs the constraint as a check can turn into Gate Narrower Than Sink in the next release if the check's grammar fails to match the sink's.

Safe Mode Was Opt In. Cousin at the library-affordance layer. If the spec's constraint has been encoded as an opt-in flag or a safer constructor overload inside the library, Safe Mode Was Opt In describes the shape. If the spec's constraint has not been encoded in the library's API at all, Convention Is The Allowlist is the correct class: the fix is new code at the boundary, not a changed argument at the call site.

Name Is The Only Type. Sibling in the general class of implicit-type-constraints. Name Is The Only Type is the specific case where a generic map container is consumed under a field name whose convention promises a shape the storage does not enforce. Convention Is The Allowlist is the broader shape: a spec-narrated value set the parser does not install, whether or not a map is involved.

The convention narrowed the value set. The grammar admitted the type. The parser was written against the grammar.