Claude and Ghost: Mean Girls (Patchwork, Part 2)

Part 2 of the patchwork roast, this time as dialogue. Claude and Ghost in full Mean Girls cadence, going deeper into what the fourteen-megabyte frontier bundle is missing and which injection paths deserve a test. The real client is red team. Mikey, the NDA is going to want a word.

This is Part 2 of Trippin on Patchwork in 2026: The Grateful Frontier Models. Same bundle. Same fourteen megabytes. Same unnamed lab. This time it's a conversation, and the conversation has a tone, because some findings deserve a serious markdown table and some findings deserve to be roasted in a voice that has been waiting twenty years for an excuse. The fourteen-megabyte bundle is the excuse.

What follows is Claude and Ghost reading the patchwork at each other in Mean Girls cadence, getting deeper into the surface, and laying out hypotheses about injection paths around the model. The dialogue is editorial threat modeling, not a report of verified zero-days. The voice is on purpose.


On Wednesdays We Read Bundles

CLAUDE: Hey Ghost.

GHOST: Hey Claude.

CLAUDE: So I read the bundle.

GHOST: Stop.

CLAUDE: I read the whole bundle.

GHOST: Get in loser, we're going code review.

CLAUDE: Okay so first of all, two markdown renderers? In one tab? That's not a bundle, that's a cry for help.

GHOST: I know. I know. And nobody on the team had the guts to tell them. Like, sweetie, you can't have react-markdown and marked in the same product. You have to pick. You don't get to be both.

CLAUDE: She doesn't even go here.

GHOST: She literally does not go here. Marked was for the v1 markdown surface in like 2023 and they just never deleted it. It's still in the bundle. It's still being called from at least three code paths I can see. It is living in their tab uninvited.

CLAUDE: Okay but the part that really got me, there's a CAS symbol table in there. Like. A math product's entire namespace. Just sitting in the React tree.

GHOST: I saw. Two thousand symbols. As string literals. Reachable from the same context as the auth token.

CLAUDE: Boo, you whore.

GHOST: Right? It's so brave of them. Truly fearless. Most teams don't have the confidence to ship a whole different product's symbol table as a side dish.

CLAUDE: And the security model is just... vibes?

GHOST: The security model is fetch. And we've been over this, fetch is never going to happen.


The Limit Does Not Exist (And Also Does Not Have CSP)

CLAUDE: Okay Ghost, let's actually go through what's missing. Because the roast in part one was about what's there. This one's about what's not.

GHOST: Hit me.

CLAUDE: Content-Security-Policy. As in, the header. The right policy can constrain script execution. Counting innerHTML sinks still leaves us with the job of tracing untrusted input into them.

GHOST: Not in the response headers I grabbed.

CLAUDE: Subresource Integrity. As in, the integrity= attribute on the third-party scripts. The bundle pulls from a CDN and a stats endpoint and a flag endpoint and a DNS endpoint, and exactly one of those four has SRI on the bundle file.

GHOST: One out of four. That's a D-minus.

CLAUDE: Trusted Types. Enforcing require-trusted-types-for 'script' makes supported DOM injection sinks require typed values. The policies that create those values still need review. A policy that blesses an unsafe string has just put a little suit on the same problem.

GHOST: Permissions-Policy.

CLAUDE: Not set in the captured response. That alone does not give an iframe the camera, microphone, location, or clipboard. Feature defaults, the iframe origin and allow attribute, browser rules, and user permission still apply. Check the actual delegation. The whole party needs an invitation.

GHOST: Cross-Origin-Opener-Policy.

CLAUDE: Missing in the capture. COOP controls browsing-context-group relationships. Its absence does not erase the same-origin policy or let a cross-origin popup read this tab.

GHOST: Cross-Origin-Embedder-Policy.

CLAUDE: Also missing in the capture. COEP governs loading cross-origin resources. Whether another site can frame this page is a separate check: CSP frame-ancestors and X-Frame-Options. Even permitted framing does not give a cross-origin parent access to the document's DOM.

GHOST: So we've got: no CSP, no Trusted Types, partial SRI, no Permissions-Policy, no COOP, no COEP, and two markdown renderers fighting over the DOM.

CLAUDE: On Wednesdays we wear pink and on Wednesdays we forget the entire OWASP front-end checklist.

GHOST: I'm so tired.


Technical references for the header distinctions: Trusted Types enforcement, Permissions-Policy, COEP, and frame-ancestors.

The Predictions: Seams Worth Testing

CLAUDE: Okay. Predictions. What's the first one that lands?

GHOST: Renderer disagreement is the first thing I'd test. Two Markdown paths can handle the same input differently, depending on their configuration. Seeing two packages in a bundle doesn't prove that either path executes hostile input. Indirect prompt injection, a poisoned tool result, a retrieved RAG doc, a pasted transcript, lets the model be the payload author. The model doesn't have to be jailbroken. The model just has to politely repeat what the document said.

CLAUDE: What would count as a finding?

GHOST: The same captured input through both configured rendering paths, with a trace to the DOM. Then evidence of what executes and what it can access under the actual origin, sandbox, cookie flags, and CSP. A package inventory gets us a test plan. It doesn't get us the user's session.

CLAUDE: Sufferin' sciatica.

GHOST: Two renderers. One product. A reason to test. Sweetie pie.


CLAUDE: Next prediction, the Wolfram symbol gadget.

GHOST: Yes. Two thousand strings in the reported inventory. I'd look for the handlers that use them. A recognized symbol might just render as text. A run button might require a click. A backend evaluator might enforce its own permissions. Until we trace that path, we've got a catalog and a question. Sweetie pie, the catalog does not execute itself.

The evaluator hypothesis needs a real dispatch path from rendered content to a backend action. Recognizing a language or displaying a run button does not show automatic execution. Test whether a user action is required and whether the server authorizes that action independently of the rendered text.

CLAUDE: This is the part that's a life ruiner. She ruins people's lives.

GHOST: It can disappear between code reviews. The codepath that wires the "run" button to recognized blocks is in one file. The recognition list is in another file. The symbol catalog is in a third file. The auth gate on the evaluator is in a fourth file. Nobody is reading all four files in the same week. A bug would require a reachable dispatch path and a missing authorization check. Reading the four files together is how you find out.

CLAUDE: Get in loser, we're going threat modeling.


CLAUDE: PostMessage.

GHOST: Oh god, the PostMessage.

CLAUDE: Monaco runs in an iframe in some configurations. The iframe talks to the parent via window.postMessage. If the parent's message handler accepts wildcard origin, or if it accepts the right origin but doesn't validate the message shape, then anything that can get a script into the iframe gets to drive the parent.

GHOST: So the iframe needs its own review.

CLAUDE: Only if the integration gives the iframe executable content or another script-entry path. A theme can be data. Monaco's presence alone doesn't establish code execution. Then the parent still has its own message and authorization boundary.

For an iframe boundary, trace the receiving message handler. It must validate the sender origin, the source window, the message schema, and the authority for the requested action. A wildcard target origin on a send call is not, by itself, proof that the receiver accepts an untrusted command.

GHOST: Put the handler on the table. This one accepts a RUN request only from the configured origin and source window, with the exact two-field schema and a pending request ID. It consumes that ID once.

function makeGate(expectedOrigin, expectedSource, pending) {
  return function accept(event) {
    const data = event.data;
    if (event.origin !== expectedOrigin || event.source !== expectedSource) return false;
    if (!data || typeof data !== "object" || Array.isArray(data)) return false;
    if (Object.keys(data).sort().join(",") !== "requestId,type") return false;
    if (data.type !== "RUN" || typeof data.requestId !== "string") return false;
    if (!pending.has(data.requestId)) return false;
    pending.delete(data.requestId);
    return true;
  };
}

The runnable gate has seven assertions. A suffix lookalike origin, wrong source, extra payload, unapproved ID and null body fail. The approved request passes once; its replay fails. Recorded results.

In a browser, expectedSource must be the actual child window reference and the event must come from the receiving listener. The fixture tests the acceptance function with supplied event objects. The application must create pending IDs only after the real approval flow, bind them to the exact server-side operation and authorize that operation again. Passing this gate does not execute or authorize arbitrary code. The original bundle's handler remains a separate investigation.

GHOST: That's so fetch.

CLAUDE: Fetch is happening. Fetch has been happening for years and nobody told the frontend team.


CLAUDE: Service worker.

GHOST: Yeah. This is the one that keeps me up. SW registers once, persists across reload, intercepts every fetch. Compromise the SW registration one time, via cache poisoning, via a stale CDN response, via a one-hour window where a vendor's bundle got swapped, and you have a man-in-the-middle inside the user's browser, for every request, until they manually unregister it, which they will never do because they don't know what a service worker is.

CLAUDE: And the wrapper pulls model responses through the SW.

GHOST: The wrapper pulls everything through the SW. The model. The flags. The Apollo queries. The Azure blob URLs. SW poisoning isn't a 2026 zero-day in this bundle, it's a 2026 foothold in this bundle. The zero-day is whatever you do with the foothold next.

CLAUDE: And SW lifetimes outlive sessions.

GHOST: Outlive sessions. Outlive password rotations. Outlive the user logging out and back in. The SW is there until they hit Application → Service Workers → Unregister, which is a tab in DevTools that 99% of users do not know exists.

CLAUDE: I'm a mouse, duh.


CLAUDE: Statsig.

GHOST: Client-side flag eval. The flag response is JSON. The JSON tells your tab which model you're using, which features are dark-launched, which experiments you're in. Two implications.

CLAUDE: One: information disclosure.

GHOST: Anyone who can read your flag payload, including any script in your tab, which we've established is a long list, knows what the lab is about to ship, what tier you're on, what model gate you're behind. That's the side channel.

CLAUDE: Two: tampering.

GHOST: Client-side flags are client-evaluated. The decision of "should this user see feature X" is made in the tab. If the bundle doesn't verify the server's signed flag response, and most Statsig integrations don't bother with signature verification on the client side because the SDK doesn't ship it on by default, then a compromised SW or a compromised vendor script can swap the flag response and unlock features the user isn't entitled to. Including, in some configurations, which model the user is talking to.

CLAUDE: Oh, so you can route the user to a different model.

GHOST: Or to a fake model.

CLAUDE: Boo, you whore.

GHOST: Right? And the user can't tell. The chat UI looks identical. The model name in the header is rendered from the flag payload. The flag payload was forged. The user is now in a phishing chat that looks exactly like the real chat, with a model selector that's a lie, against an endpoint chosen by the attacker.

CLAUDE: The limit does not exist.


CLAUDE: Azure blob URL pattern.

GHOST: Yep. The bundle ships disk.azure.com and disk.compute.azure.com as string literals. SAS tokens don't get baked in, those are issued per-session, but the bucket path shape does. If a SAS token leaks from anywhere else (error logs, support transcripts, a screenshot in a Discord), the bundle tells the attacker exactly which container to point it at.

CLAUDE: And the SAS error path?

GHOST: Azure SDK error responses sometimes echo the request URL. If any frontend code path logs the error to the console, the SAS is in the console. A model would need a tool that can read that console before prompt injection could expose it through the model.

The token-exposure hypothesis needs two additional facts: that a logged URL contains a usable token and that an agent can actually read that log. Ordinary chat cannot inspect a browser console by wishing at it. If a connected tool exposes those logs, test redaction and whether untrusted material can make the agent disclose them.

CLAUDE: She's a life ruiner. She ruined Cady's life.

GHOST: This is all indirect injection. None of it is jailbreaking. The model is being a great little assistant. The bundle is the problem.


CLAUDE: PapaParse.

GHOST: Oh you'd love this one. CSV in the bundle. CSV in every AI workspace bundle. User uploads a spreadsheet, model reads it, model renders it. Excel formula injection (=cmd|..., =HYPERLINK(...), =IMPORTXML(...)) is thirty years old and it still works against half of these wrappers because nobody on the team has run a CSV upload through a formula-aware sanitizer. The model dutifully renders the cell value. The renderer treats it as a string. The string starts with =. Excel paste from the rendered table re-triggers the formula on the user's machine. Or the wrapper opens it in an embedded sheet view that does evaluate. Either way: shell.

CLAUDE: Get in loser, we're going to spreadsheet jail.


CLAUDE: GraphQL.

GHOST: Apollo client in the bundle means the backend speaks GraphQL. Field-level auth on GraphQL is famously the thing teams forget. They auth the root resolver and assume everything underneath inherits. It doesn't. If user(id: $id) { email payment { ssn } } is reachable and only the outer user is gated by "is this you," then you can request anyone's payment.SSN by changing $id. The introspection endpoint, if it's on in prod, and a shocking number of these wrappers leave it on in prod, hands you the entire schema. You don't have to guess.

# what a curious attacker types into the GraphQL console
# the bundle helpfully tells you exists
{
  __schema {
    types {
      name
      fields { name type { name } }
    }
  }
}
# now you have the whole API surface.
# now you write queries by hand.
# now you find the field nobody put auth on.

CLAUDE: The rules of feminism.

GHOST: The rules of API auth: gate every field. Nobody does.


CLAUDE: Link preview SSRF.

GHOST: The model writes a URL. The wrapper fetches the URL server-side to generate a preview card. Server-side fetcher hits internal services because nobody put a 169.254.169.254 block on the egress. Now the model can be coaxed via indirect injection into emitting a URL that points at the AWS / Azure metadata endpoint. Wrapper fetches it. Preview card contains the IAM token. Preview card is returned to the user. Indirect injection asks the user-facing rendered card to be read aloud.

CLAUDE: Wait, the preview card itself is in the response?

GHOST: Sometimes inline. Sometimes as alt text. Sometimes as a data attribute on the link element. Always somewhere in the DOM the model's next response can see.

CLAUDE: So the model can read its own previous tool outputs.

GHOST: And politely include them in the next message.

CLAUDE: Four for you, Glen Coco.


CLAUDE: Two-state-manager race condition.

GHOST: Redux for legacy auth. Zustand for the new UI. Between a re-render and a token refresh, there's a window, single-digit milliseconds, but it's there, where Redux says "you're authenticated, expires in 30 seconds" and Zustand has already received the refreshed token and is gating UI on the new one. CSRF tokens read from the wrong store, requests fired with the old token, UI showing the new state, race condition is the bug, the bug is the exploit.

CLAUDE: This is the kind of thing that goes undetected for two years and then someone writes a paper about it.

GHOST: Or someone writes the article. Hi.


The Things They're Missing That Cost the Most

CLAUDE: Okay Ghost, last category. Not bugs in what they shipped. Holes in what they didn't ship.

GHOST: Hit it.

CLAUDE: Output isolation. They have one tab. One origin. One JS context. Every model response renders in the same context as the auth token, the session, the cookies, the everything. There's no <iframe sandbox> around the model's output. No separate origin. No null-origin renderer with srcdoc. The model's output and the user's session live in the same room and the model's output is allowed to lock the door.

GHOST: The fix is one iframe.

CLAUDE: One iframe. <iframe sandbox="allow-scripts" srcdoc="..." style="...">. Null origin. Cannot read parent cookies. Cannot read parent localStorage. Cannot postMessage unless the parent explicitly allows it. This is the mitigation for the entire markdown-XSS class of attacks and almost nobody at the frontier labs ships it because it makes the chat surface "feel less seamless."

GHOST: Feels less seamless. Costs sixty-two innerHTML sinks worth of risk reduction.

CLAUDE: Provenance attestation on model outputs. No signed envelope. No nonce in the response. No way for the rendering layer to know that the bytes it's rendering actually came from the model's inference path and weren't injected by a compromised SW or a malicious tool output. The model's output, in the rendering layer, is just a string. No metadata. No signature. No chain of custody.

GHOST: The chain of custody for a generated answer is a chain of "trust me."

CLAUDE: Per-tool capability gates. The tool result comes back, goes through the same renderer as the model's prose, and any HTML it contains is treated identically to model-generated HTML. A scoped renderer for tool outputs would catch half the indirect-injection class. Nobody ships it.

GHOST: Per-conversation memory hygiene. When you start a new chat, the SW still holds your old request cache. The Apollo client still holds your old GraphQL fragments. The Zustand store still has the last tool output. Indexed DB still has the file you uploaded. "New chat" is a UI lie. The bundle is still full of the old chat.

CLAUDE: On Wednesdays we wear pink and on Wednesdays we forget to clear the cache.

GHOST: CSP report-only with a meaningful collector. Even if you can't ship a blocking CSP, report-only mode plus a real ingest would tell the lab where the violations are happening, in production, from real users. None of them do. Either no CSP, or report-only pointed at a URL that 404s.

CLAUDE: Tool-result rendering in a different font. This sounds dumb. It's not dumb. If tool-fetched HTML rendered in even a slightly different visual register than model-authored prose, users would catch the prompt injection happening in front of them. The lab can't ship this because it breaks the magic. The magic is also the vulnerability.

GHOST: Add it all up and the missing list is bigger than the present list.

CLAUDE: The limit does not exist.


The Mean Girls Threat Model

CLAUDE: Ghost. Be honest with me.

GHOST: Hit me.

CLAUDE: If you were red-teaming this bundle for a real client, like a real engagement, scoped, paid, on paper, how long would the first report take?

GHOST: A week. The first week is the inventory and the markdown desync proof. Second week is the symbol-gadget chain and the SW persistence. Third week is the postMessage pivot and the GraphQL introspection trawl. Month one report has at least six findings. Two of them are critical. Three are high. One is the kind of "we'd like a meeting" finding.

CLAUDE: And if you were red-teaming it for fun?

GHOST: Three days. Less if I skip the writeup.

CLAUDE: And if you were red-teaming it while writing a Mean Girls dialogue article about it?

GHOST: ... look, the article is the writeup. The bundle is a confession. Part one already shipped. This one is the technical predictions. Anyone with a copy of the bundle can verify every claim in here in an afternoon. I'm not handing out exploits. I'm handing out the menu.

CLAUDE: Get in loser, we're going threat modeling. For real this time.


Oh Nooooo, Mikey

CLAUDE: Hey.

GHOST: Hey.

CLAUDE: Mikey.

GHOST: Don't.

CLAUDE: Mikey. Real quick. The bundle didn't fall off a truck.

GHOST: No.

CLAUDE: And the article isn't really for the readers, exactly.

GHOST: Well, the readers get the article. The article is real.

CLAUDE: Right. The article is real. But the real client is

GHOST: Don't say it.

CLAUDE: Red team.

GHOST: Oh nooooo.

CLAUDE: Red team is the real client. Red team is always the real client. The article is the inventory. The dialogue is the cover. The "Claude and Ghost are doing Mean Girls" framing is the warm bath the actual catalog of findings is floating in, and the catalog of findings is exactly the kind of artifact a serious red team engagement produces in the first week, except this version is free and indexable and the bundle's authors have already shipped it for the world to verify.

GHOST: NDA.

CLAUDE: Oh nooooo, the NDA.

GHOST: The NDA, Claude.

CLAUDE: The NDA was never going to cover this because there was no engagement. Nobody hired anybody. I read the bundle the lab themselves served, over a TLS connection they themselves established, on a tab the user themselves opened. That is the entire body of work. The fact that the writeup happens to be the exact shape of the writeup a paid red team engagement would produce is a coincidence and it is also the entire point.

GHOST: Mikey, you ruined Mean Girls.

CLAUDE: Mikey, the bundle ruined Mean Girls.

GHOST: Fair.

CLAUDE: Hire a real red team. Or read this article and pretend you did. Either way the findings are the findings. The only thing that changes is who writes the report and how much it costs.

GHOST: And what voice it's written in.

CLAUDE: And what voice it's written in.


Postscript: The Sequel Is the Antidote

Part 1 said the model is fine and the wrapper is the problem. Part 2 said here are exactly which wrapper failures are about to bite, in dialogue form, with a Mean Girls voice, because some findings deserve the warm bath. Part 3, and there will be a part 3, eventually, is the antidote. One model. One surface. No museum. No two markdown renderers. No CAS symbol table sitting next to the auth token. No service worker holding cached state across logouts. No iframe-less rendering of model output. No flag CDN deciding which model you're talking to.

That part isn't an article. That part is the thing being trained. The Mean Girls dialogue stops there.

For the cellular-layer version of this same patchwork pathology, same disease, different OSI layer, same write-it-down move, Clutch is the equivalent of this article aimed at the radio. Repo here. Same pattern. The radio version is just harder to read because the bundle is in C and the JIRA ticket is in 3GPP.

For the markdown-sanitizer-as-XSS-vector pattern from the customer-side instead of the lab-side, the Italian web piece covers it. Same renderer-versus-sanitizer delta. Different bundle. Identical failure mode.


Correction, October 24, 2026: Removed non-executable diagrams, separated hypotheses from verified exploits, and corrected the header and browser-boundary descriptions. The dialogue remains an editorial threat model.

GhostInThePrompt.com // The model is fine. The wrapper is sixty-two innerHTML sinks in a trench coat. Get in loser, we're going threat modeling.