//nefariousplan

Parallel Implementation Gap

A capability is implemented by two or more parallel modules (per adapter, per runtime, per deployment target, per verb, per dispatcher branch). The canonical module imports a security check from a shared utility and enforces it. A divergent module, written separately against the same client-facing contract, never imports it. One surface is gated. The other is the CVE.

The capability is implemented twice. Once with a safety check. Once without.

A shared contract expands. The team needs a new adapter for a new deployment target, a new runtime for a different platform, a new RPC verb on an existing resource, a new branch inside a dispatcher that already handles two cases. The author of the fork reads the client-facing contract and implements against it. The invariants that make the existing implementation safe, an allowlist, a permission check, a cumulative-byte counter, a cleanup hook, are not in the contract. They live inside a helper the canonical imports. The fork implements the contract and skips the import. Both surfaces now accept the same requests. One of them is gated. The other is the CVE.

Mechanism

The pattern names a specific failure mode of institutional memory. A security invariant that has to hold for a capability is enforced by a helper function at one call site: the canonical implementation. The client-facing contract, the HTTP route, the method signature, the RPC name, the config key, advertises what the capability does. It does not advertise what the canonical did to make the capability safe. When the capability is forked for any reason, the fork's author reads the contract and the destination's framework idioms. They do not read the canonical's imports.

Two structural facts reinforce the gap. First, security helpers are rarely promoted to convergence points every caller must route through; they are functions the author has to remember to call, not signatures the compiler enforces. A validator with one caller for a contract exposed by five routes is a validator whose coverage depends on the reviewer counting siblings. Second, when the canonical is patched later, the diff is framed as hardening the known call site. The patch's author rarely enumerates every sibling that implements the same contract, so the fix moves from the canonical file and stops there. Axios's maxContentLength sat inside the buffered branch's chunk counter for seven years; the streaming branch had no chunk counter and therefore no place for the limit to live. The patch moved the limit onto a Readable wrapper authored specifically to host it, the convergence point both branches could route through.

The class covers every scale at which a fork can occur. Astro's Cloudflare adapter never imported the canonical image endpoint's allowlist across packages. MLflow's basic-auth gated the Flask app and left three FastAPI routers public across runtimes. mcp-atlassian's path validator covered both download sites in one module and neither upload site across the two directions of one capability. Next.js's self-hosted upgrade handler lacked the absolute-URL guard the Vercel edge runtime had, the self-hosted twin inheriting the contract but not the hardening. Apache's ap_expr shipped a RESTRICTED flag in 2011; fifteen years later three modules still parsed expressions without opting in. Vite's /@fs route remembered the server.fs.allow check; the WebSocket's fetchModule reached the same loader without it, across transport protocols. Drupal's pgsql override started handling array values where the base class deliberately abstained, inheriting unsafety by overriding a safe default. libssh2's chacha20-poly1305 branch added a cipher-suite case without the precheck its sibling branch, twelve lines up in the same function, had been running. The distance between the canonical and the divergent implementation ranges from a package boundary to two arms of one if/else inside one function. The mechanism does not care about distance. It cares that the fork exists and the invariant is not named in the contract.

What distinguishes this class from design-debt-driver is the shape of the fix and the shape of the next CVE. A design-debt-driver's next CVE comes from the same component, same bug class, different trigger. A parallel-implementation-gap's next CVE comes from the next fork of the same contract: a new adapter, a new runtime, a new verb, a new branch. The fix is not rearchitecture. The fix is naming every sibling and routing them through a convergence point. When the author of a canonical patch declines to count siblings, the gap persists in whatever parallel implementations they did not enumerate. libssh2's _libssh2_packet_add shipped a dispatcher where every switch arm's protocol parser followed a convention of checking helper return values; one newer arm wrote the same shape without the checks. The idiom was in the file five times over. The sixth copy was the CVE.

Exhibits

CVE-2026-42203: LiteLLM Patched One of Four Jinja2 Prompt Managers. CVE-2026-42203 is the same-library variant. LiteLLM has at least five implementations of "load a prompt template, render with Jinja2": litellm/llms/prompt_templates/factory.py (the canonical), and four prompt-manager modules under litellm/integrations/ (dotprompt, gitlab, bitbucket, arize). The canonical was hardened in April 2024 by BerriAI's co-founder, switching from jinja2.Environment to jinja2.sandbox.ImmutableSandboxedEnvironment. The four prompt managers added after that commit each imported plain Environment from the same library. The CVE was assigned only to the divergent module that had an HTTP route attached (POST /prompts/test); three weeks later a separate commit fixed the same primitive in the other three. Where Astro's Cloudflare adapter forgot the allowlist across packages and MLflow's FastAPI routers forgot it across runtimes, this exhibit shows the gate failing to copy from a security commit two years deep in the same repository's history to four sibling modules that all imported from the library the commit had already named.

CVE-2026-42036: Axios's maxContentLength Lived Inside the Buffered Branch's Counter. The Streaming Branch Did Not Buffer.. CVE-2026-42036 is the within-function variant. Axios's lib/adapters/http.js forks at line 788 on responseType === 'stream'. The else branch buffers the response and attaches a byte counter to the chunk handler it needs anyway; the maxContentLength check rides inside that counter, four lines below the buffer-append. The if branch hands the readable to the caller and settles immediately, so it has no chunk handler to attach a counter to and never had a place for the limit to live. Where Astro's Cloudflare adapter forgot the allowlist across files, mcp-atlassian forgot it across functions, and MLflow's FastAPI routers forgot it across runtimes, this exhibit shows the gate failing to copy across two adjacent branches of the same control-flow fork in the same function. The 2019 commit that added maxContentLength (acabfbd, fixing #1098) put the check inside the chunk handler it had open in its editor and never moved its gaze up. The 2026 patch is a Readable wrapper whose entire job is to count bytes the streaming branch never had to count. The same v1.15.1 release ships the same shape a second time: CVE-2026-42034 patches maxBodyLength, which had been enforced by follow-redirects for the redirect path and by no one for the native maxRedirects: 0 path. Both CVEs from the same researcher in the same release. Both are the gate failing to copy across paths that were always there.

CVE-2026-39363: Vite's /@fs Route Returns 403. The HMR WebSocket Returns the File.. Vite has two callers that ask the dev server to load a module by id: the HTTP /@fs/ middleware and the WebSocket fetchModule invoke handler. The middleware remembers to call isServerAccessDeniedForTransform against server.fs.allow; fetchModule calls transformRequest with no allowId, so the same loader path runs without the same gate. The canonical caller has the check, the divergent caller forgot it, and the loader they share will read whatever you ask for. CVE-2026-39363 is what happens when the second caller's author didn't know the first caller was the one holding the door shut.

CVE-2026-0545: MLflow's basic-auth Only Gated Flask. Three FastAPI Routers Were Open.. CVE-2026-0545 is the across-runtimes variant. MLflow's tracking server is a FastAPI app with the legacy Flask app mounted at /, and the basic-auth provider in mlflow/server/auth/__init__.py writes one gate for each runtime: a Flask before_request hook that denies every path not on a four-entry unprotected list, and a FastAPI middleware that consults _find_fastapi_validator and forwards every path the function doesn't match. Both gates were registered in the same factory. They have opposite defaults. Three of the four FastAPI routers in mlflow/server/fastapi_app.py (otel_router, job_api_router, assistant_router) were not in the validator-finder's table and shipped publicly for twenty weeks until commit bb62e77 added them. Where Astro's exhibit shows the gate failing to copy across modules and mcp-atlassian's shows it failing to copy across upload-vs-download directions, MLflow's shows it failing to copy across the two router-tables one team owns and the other team has to mirror. Adding a router to fastapi_app.py and forgetting _find_fastapi_validator is "ship a new public HTTP surface."

CVE-2026-27825: mcp-atlassian's Path Patch Guarded Every Write. open(file_path, "rb") Is a Read.. CVE-2026-27825 is the same-axis variant. mcp-atlassian implements "open a filesystem path the caller named" in two parallel modules, src/mcp_atlassian/confluence/attachments.py and src/mcp_atlassian/jira/attachments.py. Each module contains two open() call sites: one as the destination of a network response (download write) and one as the source of a network request (upload read). Commit 52b9b099 (Feb 24, 2026, addressing GHSA-xjgw-4wvw-rgm4) imported the shared validate_safe_path helper into both modules in the same diff. It applied the helper at both download sites and at neither upload site. The security utility was at the worksite. The patch author rewrote an existing inline guard in jira/attachments.py thirty lines above the unguarded upload_attachment and did not look further. Where Astro's exhibit shows the gate failing to copy across modules, this exhibit shows the gate failing to copy across directions within a module the patch already had open in its editor.

CVE-2025-58179: Astro Shipped Two /_image Endpoints. Only One Read the Allowlist.. CVE-2025-58179 is the canonical exhibit. Astro's /_image URL contract is implemented twice: packages/astro/src/assets/endpoint/generic.ts (the canonical, used by the dev server and Astro's default image pipeline) and packages/integrations/cloudflare/src/entrypoints/image-endpoint.ts (the Cloudflare adapter's, used by output: 'server' deployments running imageService: 'compile'). The canonical imported isRemoteAllowed from astro/assets/utils from at least 2023-09-29 and enforced the configured image.domains allowlist on every remote URL. The Cloudflare adapter file was created empty in 2024-01, filled with a 12-line proxy in 2024-08 that imported zero security utilities, and shipped without the gate for twelve months and twenty-four days until the August 2025 patch. The patch is isRemoteAllowed, copied from the file two directories away. Five weeks later the same handler took another security commit, this one paired with an identical commit in the canonical generic endpoint, demonstrating the inheritance arrow goes both ways: the canonical's holes propagate to adapters that copy it, and adapters written without copying the canonical inherit none of its safety.

CVE-2026-55199: libssh2's EXT_INFO Loop Skipped the Return Check the Rest of the File Was Running. CVE-2026-55199 is the across-switch-case-parsers-in-one-dispatcher variant. _libssh2_packet_add() in libssh2's src/packet.c is a switch over SSH message types where each case ships its own ad-hoc parser. The file's convention is to read protocol fields through string_buf helpers and check the return on every call; the canonical call sites are in packet_queue_listener (forwarded-tcpip CHANNEL_OPEN), packet_x11_open (X11 CHANNEL_OPEN), the KEXINIT algorithm-list parse, and the CHANNEL_REQUEST parser's request-name and exit-signal reads. The SSH_MSG_EXT_INFO case writes the same shape inside a count-driven loop with two unchecked _libssh2_get_string() calls, where the discarded returns cause the loop to no-op rather than break on parse failure. Where the sibling exhibit on _libssh2_transport_read shows the gate failing to copy across two branches of one fork twelve lines apart, this exhibit shows it failing to copy across the protocol-case parsers each owned by a different SSH message type in the same dispatcher. NVD's CWE-835 assignment ("Loop with Unreachable Exit Condition") misnames the bug: the pre-loop nr_extensions >= 1024 cap makes the exit reachable in at most 1023 iterations, and the patch author's commit message explicitly says so. The fix is two if(...) break; statements that exit the loop on the same -1 return value the file's other count-driven parsers had been checking against. Both libssh2 CVEs from the June 2026 audit cluster were landed by TristanInSec; both are this pattern, eight weeks apart.

CVE-2026-55200: libssh2's chacha20-poly1305 Branch Skipped the Precheck Its Sibling Already Had. CVE-2026-55200 is the across-branches-of-one-fork-in-one-function variant, with a structural cause attributable to cipher-suite history. _libssh2_transport_read forks on whether the negotiated cipher's CRYPT_FLAG_R(REQUIRES_FULL_PACKET) is set. The sibling branch (used by everything except [email protected]) validates p->packet_length > LIBSSH2_PACKET_MAXPAYLOAD against the wire field before computing the allocation. The divergent branch validates total_num > LIBSSH2_PACKET_MAXPAYLOAD against the sum after computing it, where the sum can wrap to a small value when packet_length is 0xffffffff and auth_len is 16. Where the radare2 exhibit shows the security envelope failing to copy across r2-command emit sites in a single parser, Vite's shows it failing to copy across the HTTP and WebSocket callers of one loader, and Netty's shows it failing across five if/else branches of one decoder method, libssh2's case is the same shape inside a much smaller distance: the divergent branch is twelve lines down from the sibling, in the same function, around the same if/else. The chacha20-poly1305 branch was added because the cipher's encrypted-length feature required whole-packet handling. It was added without copying the precheck the existing branch already had. The patch is the existing branch's precheck, copied across the if, byte-identical.

CVE-2026-39816: Apache NiFi Patched One Annotation. Ten Days Later, Apache Removed the Mechanism.. CVE-2026-39816 is the across-bundles variant. Apache NiFi gates code-executing components by a class-level @Restricted(requiredPermission = RequiredPermission.EXECUTE_CODE) annotation that the framework reads via class.getAnnotation(Restricted.class). Sixteen components across four bundles (nifi-scripting-bundle, nifi-groovyx-bundle, nifi-jolt-bundle, nifi-standard-bundle) carry the tag. The graph bundle ships three code-executing surfaces (TinkerpopClientService, ExecuteGraphQuery, ExecuteGraphQueryRecord) that all reach GroovyShell.parse() + compiled.run() in the NiFi JVM and never imported the annotation. Where Camel's CVE-2026-40858 shows the gate failing across nine independent component modules in the same vendor's monorepo with no shared utility tying them together, this exhibit shows the same shape in NiFi: the canonical scripting authors wrote @Restricted on every code-executing component they shipped; the graph-bundle author wrote a code-executing component and never imported org.apache.nifi.annotation.behavior.Restricted at all. The gate has been in the framework since NiFi 1.x. The fix is eleven lines copied from the file that had it. NiFi 2.0.0-M1 through 2.8.0 shipped the gap for two years.

CVE-2026-41641: NocoBase's checkSQL Gated Two of Three SQL Actions. The Third One Persists.. CVE-2026-41641 is the smallest-distance variant of this pattern. NocoBase's @nocobase/plugin-collection-sql exposes three actions that accept user-supplied SQL: collections:create, sqlCollection:execute, and sqlCollection:update. PR #5913 by maintainer 2013xile on December 19, 2024 introduced checkSQL in utils.ts and wired it to two of the three in a single diff: a middleware on collections.create in plugin.ts, and an inline guard on execute in sql.ts. The third action sits in the same file as execute, as the next exported key on the same object literal, under the same import { checkSQL } from '../utils'. Where Astro's exhibit shows the gate failing to copy across packages, MLflow's across runtimes, Axios's across branches of one function, and JeecgBoot's across sibling methods on a controller class, this exhibit shows the gate failing to copy across two exported keys of the same object literal in the same file. The April 17, 2026 fix (851aee5, PR #9134) is the six lines from execute re-typed into update. The fix author is the same 2013xile who shipped the original gate sixteen months earlier. The persister-versus-executor framing matters because update does not run SQL itself; it stores SQL the next :list executes, making the deferred-execution path the one place in the threat model the maintainers never wrote down.

CVE-2026-8196: validateCaptcha Is a Sibling Method. mLogin Does Not Call It.. CVE-2026-8196 is the same-class variant. JeecgBoot's LoginController.java declares two parallel implementations of "accept username and password, return a JWT for that user": login() at line 84 and mLogin() at line 650, both @RequestMapping POST handlers on the same controller class. The captcha gate is a private method named validateCaptcha declared on the same class, 278 lines below mLogin. The web login invokes it at step 2 of its numbered comment-block. The mobile mLogin copies steps 1, 3, 4, 5, 7, 8 of login's structure and omits step 2. Where Astro's Cloudflare adapter forgot the allowlist across packages, mcp-atlassian forgot it across upload-versus-download directions in the same module, MLflow forgot it across runtimes, Axios forgot it across two branches of one function, and Apache forgot it across module callers of the shared ap_expr parser, this exhibit shows the gate failing to copy across sibling methods on the same Java controller class. No import, no constructor wire, no shared utility module: validateCaptcha is reachable from mLogin by typing its name. The convention was local to one source file the whole time; the file's author of the divergent method copied the structure without copying the call.

CVE-2026-44578: The Advisory Names Cloud Metadata. The Bug Pins to Localhost.. The advisory says "self-hosted only; Vercel-hosted not affected" — that phrase is the pattern's fingerprint. Vercel's edge runtime and the standalone router-server are two implementations of the same upgrade-handling contract; only one received the absolute-URL guard. The vulnerable path is in packages/next/src/server/lib/router-server.ts, which is code Vercel deployments don't execute. The parallel implementation is hardened by being elsewhere; the self-hosted twin inherited the contract but not the hardening.

CVE-2026-24072: AP_EXPR_FLAG_RESTRICTED Was Opt-In For Fifteen Years. The Patch Opts In Three Modules. Four More Still Read /etc/passwd From .htaccess.. Apache's ap_expr parser shipped AP_EXPR_FLAG_RESTRICTED in 2011 with a docstring that named one consumer (mod_include). Two modules eventually picked it up on their own; three more were patched in 2.4.67 after this CVE; four still parse .htaccess-reachable expressions without it. The shared dangerous-provider gate exists; the callers are the inconsistent surface. This is the same shape as Vite's vite-fs-route-returns-403-hmr-socket-returns-the-file: one loader, multiple parallel callers, one path forgot to ask for the gate that the other paths remembered.

CVE-2026-40858: Same Five Lines. Same Author. Eight Apache Camel Components.. CVE-2026-40858 is the across-components-in-one-monorepo variant. Apache Camel implements "ferry a DefaultExchangeHolder over a network" in at least nine separate modules: camel-sql, camel-cassandraql, camel-leveldb, camel-consul, camel-netty, camel-mina, camel-jms, camel-infinispan, and the camel-vertx-http / camel-netty-http helpers. The first instance to get ObjectInputFilter was camel-sql on January 9, 2024 (CVE-2024-22369). The eighth, camel-infinispan, got it on April 14, 2026 (this CVE), twenty-seven months later. Where Axios's exhibit shows the gate failing to copy across branches of one function, MLflow's across runtimes, mcp-atlassian's across upload-versus-download directions, and JeecgBoot's across sibling methods on the same controller class, this exhibit shows the gate failing to copy across nine independent component modules in the same vendor's monorepo with no shared utility tying them together. The canonical was hardened first; the divergent modules each waited their turn. The same author signed all nine commits.

CVE-2026-9082: The Comment Said Use the Array Values. A 2020 Refactor Started Using the Keys.. The base Sql/Condition::translateCondition() refuses to handle array values; it returns early. The pgsql override has to handle them because PostgreSQL's case-sensitive text collation forces a manual LOWER() IN-clause build. The safe sibling abstains; the unsafe sibling overrides the abstention. The 2026 patch inserts the same array_values() guard into the base class's compile() so the next dialect-specific override cannot reintroduce the gap by accident.

Boundaries

Not design-debt-driver. That class describes one component producing the same bug class over years. Here the component is multiple parallel implementations of one contract, and the next CVE arrives when the next fork is written, not when the next feature is added to the canonical. A design-debt-driver can ship across forks and start producing parallel-implementation-gaps as a secondary mode, but the two classes name different generators.

Not backport-gap. That class describes one source tree shipped on multiple release branches, where the fix lands on one branch and the CVE record covers the others. Here the implementations are distinct code bodies within one version, each the output of a separate authoring task against the same contract. The temporal axis of backport-gap (fix date versus release-branch date) does not organise this class; the authoring axis (canonical module versus divergent module) does.

Not gate-before-canonicalize or gate-narrower-than-sink. Both of those describe one gate whose semantics disagree with one sink's semantics across a single data flow. Parallel-implementation-gap describes two or more gates between two surfaces that expose the same contract: one gate present and enforcing, the other gate absent entirely. The failure is not disagreement between a matcher and an action. The failure is a sibling implementation that was written without the matcher at all.

Not todo-that-shipped. Here the invariant was not deferred, not written as a comment, not scheduled for a follow-up ticket. It was implemented, deployed, enforced, and shipped to production inside the canonical fork. The sibling's absence is not an unfinished task; it is a task that was never started because the fork's author did not know the canonical's invariants were theirs to carry.

Defender playbook

For every shared security helper in the repository, enumerate its callers. Enumerate the surfaces that expose the contract the helper exists to protect. Report the delta before merging any new adapter, runtime, package, or RPC handler. A validator with one caller for a contract exposed by five routes is a CVE waiting on the right reviewer. The audit is one grep for the helper's name and one grep for the contract's URL prefix, run side by side.

When patching a CVE in one implementation, treat the patch as a search obligation. Siblings to enumerate: other adapters implementing the same contract, other branches of the same dispatcher, other methods on the same controller class, other callers of the same sink, other verbs on the same resource, other packages whose README names the vulnerable one as a template or drop-in. Ship the fix to every sibling in the same release, or document explicitly why each omitted sibling is out of scope. The next researcher will count the siblings you did not count.

Prove the patch closes the class, not the demonstrated path. Write a test that exercises the invariant through every parallel implementation that shares the contract. If the test fails on one implementation and passes on untouched siblings, the siblings are the next CVE. If the test can only be written against one implementation because the others share no convergence point, you have found the root cause. The fix is to create the convergence point, not to retype the check in each sibling.

When an invariant must hold across forks, promote it from a helper the canonical imports into a convergence point every fork must route through. A function the author has to remember to call is weaker than a signature the compiler enforces. A wrapper that types the limit into a constructor is weaker than a factory that cannot be bypassed. Move the invariant closer to the type system and further from the author's memory. Where that is not feasible, add a lint or a CI check that fails the build when a sibling of the convergence point is added without the call.

Kinship

Design Debt Driver. Both classes describe a bug family whose instances keep shipping from a known locus. Design-debt-driver's locus is one component's architecture, and each new CVE is a new trigger against the same substrate. Parallel-implementation-gap's locus is the set of forks of one contract, and each new CVE is the next fork the canonical patch did not reach. A component that forks its interface across adapters starts producing parallel-implementation-gaps as a secondary mode; a shared contract whose forks keep reintroducing the same missing helper starts to look like a design-debt-driver on the contract itself.

Todo That Shipped. Both classes describe code that should have been present at a site and was not. Todo-that-shipped's evidence is in the comment or ticket the fix was deferred to: the author knew the invariant belonged there and left a marker. Parallel-implementation-gap has no marker. The sibling author did not know the invariant belonged to them because the invariant was not in the contract they were implementing against; it was in a helper the canonical fork imported silently.

The contract is what you promised the caller. The invariants that make the promise safe are what you forgot to promise the next author.