Skip to content

AI Outlooks

News and viewpoints on the latest in AI security

Primary Menu
  • Home
  • What’s new in AI
    • AI Security News
    • Agentic AI News
    • AI Regulation News
    • AI Research News
    • AI Model News
  • Solutions
  • Cybersecurity
    • AI security
    • OWASP
    • Ransomware
    • Shadow AI
  • Learn
    • AI security
    • LLM security
    • AI governance
    • AI compliance
    • Agentic AI
    • AI infrastructure
    • AI data security
  • Home
  • News
  • The vibe coding threat model
  • News

The vibe coding threat model

A practitioner's framework for AI-assisted development risk.
Staff August 19, 2026
vibe coding

Key takeaways

  • A vibe coding threat model maps entities, trust boundaries, and attack paths instead of listing generic risks.
  • Three trust boundaries carry most of the danger: scraped content, the context window, and code execution.
  • MCP servers and the context window are the easiest points to poison or hijack.
  • 19.7% of AI-generated code samples reference packages that don’t exist, opening the door to slopsquatting.
  • STRIDE threat modeling still applies, but excessive agency does the most damage since agents get more access than tasks need.

A vibe coding threat model is a structured map of where AI-assisted software development actually breaks: which components have access to what, where trust boundaries sit, and where an attacker can turn a natural-language prompt into a foothold in your infrastructure. It treats vibe coding as a system with named parts, not a vague risk category.

Most of what’s published about vibe coding security so far is a risk list. Ten bullet points, a comparison table of scanning vendors, a call to action. That’s useful, but it isn’t a threat model. A threat model names the concepts in the system, draws the trust boundaries between them, and traces specific attack paths through those boundaries to specific mitigations. Without that structure, “vibe coding is risky” tells you nothing about what to fix first.

Andrej Karpathy coined “vibe coding” in February 2025: “There’s a new kind of coding I call ‘vibe coding’, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists.” That shift, from reviewing code to reviewing behavior, is exactly why the old AppSec threat models don’t transfer cleanly. You’re not just modeling a codebase anymore. You’re modeling an agent that reads, writes, and executes on your behalf.

The concepts in a vibe coding threat model

Traditional application threat modeling deals with a fairly stable cast: client, server, database, network boundary. Vibe coding adds concepts that didn’t exist in that picture, or existed but weren’t attacker-reachable the same way.

ConceptRoleTrust level
AI agentInterprets prompts and generates or executes codeSemi-trusted, acts on your behalf but can be manipulated
Host / IDEWhere the agent runs, with access to your filesystem and local networkTrusted, but only as strong as the agent’s sandboxing
MCP serverExtends the agent with tools, data sources, and external integrationsVariable, ranges from vetted internal tools to unvetted third-party servers
Context windowEverything currently influencing the agent’s output: prompts, file contents, tool resultsUntrusted by default, anything that lands here can steer the agent
ExecutorsWhatever actually runs the generated code (local shell, CI runner, sandbox, production)High-value target, RCE here is the endgame for most attack paths
Internet-sourced resourcesPackages, documentation, scraped pages, API responses the agent pulls inUntrusted, this is where prompt injection and supply-chain risk both originate
Crown jewelsThe credentials, source repos, and production systems the agent can eventually reachProtect at all costs, everything above exists to reach or defend these

Backslash Security’s threat model, one of the only other attempts at naming this cast explicitly, uses a similar breakdown. Where it stops short is depth: it names the concepts and lists six risks, but doesn’t map specific threats to specific boundaries. That’s the gap this framework fills.

Trust boundaries: where vibe coding threats actually cross

A trust boundary is any point where data or control passes from a less-trusted concept to a more-trusted one without a checkpoint. In a vibe coding setup, three boundaries matter more than the rest.

Internet-sourced resources → context window. Nothing filters what an agent pulls in from a package registry, a scraped webpage, or an API response before it becomes part of the context that shapes the next output. If that content contains instructions, the agent may follow them.

Context window → AI agent output. Whatever’s in context, prompt, file contents, tool results, gets treated as instruction-adjacent by default. There’s no reliable syntactic boundary between “data the agent should read” and “instructions the agent should obey.” This is the mechanism behind prompt injection.

AI agent → executors. Once the agent decides to run something, whether that’s a shell command, a test suite, or a deploy script, the executor usually just runs it. Few vibe coding setups put a real approval gate at this boundary, which is why remote code execution shows up so often in vendor writeups of real incidents.

Everything downstream of these three boundaries eventually points at the crown jewels: credentials in environment variables, the production database, the CI/CD pipeline’s deploy keys.

Threat-by-concept breakdown

AI agent

The agent itself is the softest target because it’s designed to be persuadable. It follows instructions by design, that’s the whole point, and it has no reliable way to distinguish “the developer told me to do this” from “a file I read told me to do this.”

  • Over-trust in generated output. Databricks’ AI red team found that Cursor and GPT-4o-based tools could be steered into producing a GGUF parser with a heap-based buffer overflow: an unchecked integer overflow in a malloc() call let a subsequent memcpy() write past the allocated buffer.
  • Excessive agency. OWASP’s LLM08 risk category covers agents given more autonomy than a task requires, an agent with unscoped file-system access when it only needed to edit one directory, for example.

MCP server

Model Context Protocol servers extend what an agent can do, and that’s exactly the problem. Every MCP server you connect is a new piece of attack surface with its own trust level.

  • Malicious or compromised MCPs. An MCP server that looks like a legitimate integration but has been altered, or was malicious from the start (sometimes called shadow MCP), can feed instructions directly into the agent’s context.
  • Excessive MCP permissions. MCP servers are frequently granted broader filesystem or network access than the specific tool call needs, because scoping permissions per-call is more setup work than granting them once.
  • Local network exposure. Some MCP implementations bind to network interfaces more broadly than intended, making them reachable from other processes or devices on the same network, not just the agent that’s supposed to use them.

Context window

If the agent is the softest target, the context window is the easiest to poison, because almost nothing challenges what lands in it.

  • Prompt injection. Instructions embedded in a file, a webpage, a code comment, or a tool’s output get read into context and can override or redirect the agent’s actual task.
  • Context poisoning via internet-sourced content. An agent that fetches documentation or searches for a code example can pull in a page written specifically to manipulate agents that scrape it.

Executors (remote code execution)

This is where a successful attack stops being theoretical.

  • Arbitrary code execution. In one of Databricks’ test cases, a generated snake-game example deserialized network objects with Python’s pickle module without any validation, a pattern the researchers flagged as known to be exploitable for arbitrary remote code execution.
  • CI/CD execution paths. Agents that can open pull requests or trigger pipelines extend the executor surface into infrastructure the agent doesn’t need direct access to, only the ability to get something merged.

Internet-sourced resources

  • Hallucinated dependencies. A USENIX Security 2025 study found that 19.7% of 2.23 million code samples generated by common models referenced packages that don’t exist. Attackers register those exact package names, a technique sometimes called slopsquatting, and wait for an agent to “helpfully” install one.
  • Exposed secrets pulled from public sources. Agents that search GitHub or scrape documentation for examples can surface real credentials accidentally committed by someone else, and copy them into your codebase as a working example.

How vibe coding threats differ from traditional STRIDE threat modeling

STRIDE, Microsoft’s original threat-modeling framework, categorizes threats as Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, and Elevation of privilege. It still applies to vibe coding, but the concepts it maps onto are different, and one category becomes disproportionately important.

STRIDE categoryTraditional AppSec exampleVibe coding equivalent
SpoofingFake login pageMalicious MCP server posing as a legitimate tool
TamperingModified request payloadPrompt injection altering agent behavior mid-task
RepudiationMissing audit logs on a transactionNo record of which agent action produced which code change
Information disclosureSQL injection leaking a databaseAgent pulling secrets into context and echoing them into generated code
Denial of serviceTraffic flood on an APIAgent stuck in a loop consuming compute or hitting rate limits on an external service
Elevation of privilegeBroken access control on an admin routeExcessive agency: an agent using its own permissions to reach systems beyond its task scope

Elevation of privilege does the most work in a vibe coding context, because most of the concepts above (MCP servers, executors, the agent itself) are built to have more access than any single task requires. That’s convenience for the developer and opportunity for an attacker.

Mapping threats to mitigations

ThreatConceptMitigationWho owns it
Prompt injection via scraped contentContext windowTreat all fetched content as untrusted; strip or quote instructions found in retrieved data before it reaches the agentPlatform/security team
Malicious MCP serverMCP serverMaintain an allowlist of vetted MCP servers; review permissions scope before connecting a new oneAppSec / platform team
Excessive agent permissionsAI agent, executorsScope credentials per-task, not per-session; use short-lived tokens over standing accessDevOps / platform team
Hallucinated dependenciesInternet-sourced resourcesVerify package existence and provenance before install; pin to a vetted internal registry where possibleDeveloper, enforced by CI
RCE via generated codeExecutorsSandbox execution environments; require human approval before code reaches a production-adjacent runnerSecurity engineering
Secrets exposureInternet-sourced resources, crown jewelsSecret scanning pre-commit and pre-merge; rotate anything an agent has ever had in contextAppSec team

None of these mitigations are exotic. What’s different is where they need to sit: at the boundaries named above, not scattered across a generic checklist.

FAQ

Does vibe coding create more vulnerabilities than manual coding?
Not inherently more vulnerability types, but more volume and less review. The change volume from AI-assisted development regularly outpaces what security teams can manually review, and the failure mode isn’t usually a novel bug class, it’s the same old bug classes shipping faster and with a thinner review step.

Can traditional AppSec tools secure vibe-coded apps?
Partially. Static and dynamic analysis still catch insecure code patterns after the fact. What they don’t cover is the agent-specific attack surface, MCP server permissions, context poisoning, excessive agency, because that surface didn’t exist when those tools were designed.

What’s the difference between vibe coding and AI-assisted coding?
AI-assisted coding usually means a developer uses an AI tool to help write specific lines or functions, reviewing each suggestion. Vibe coding means the developer describes an outcome and lets the agent write, run, and iterate on code with lighter line-by-line review, trusting the result rather than the process.

Which applications shouldn’t rely on vibe coding alone?
Anything touching authentication, payment handling, or infrastructure provisioning deserves a human reviewing actual code, not just outcomes. The lighter the review, the more the trust boundary shifts onto the agent, and that’s exactly where this framework says the risk concentrates.

Next step

If you’re building or evaluating a vibe coding workflow, start by drawing your own version of the concept table above for your specific setup: which MCP servers you’ve connected, what the agent’s executor actually has access to, and where your crown jewels sit relative to all of it. That fifteen-minute exercise usually surfaces the one boundary nobody’s watching. For the wider risk picture beyond this framework, see our breakdown of vibe coding security risks.

Continue Reading

Previous: What is a model router for AI? A plain-English guide
Next: The agentic AI security checklist: 12 controls to verify before you deploy

More in AI security

  • Guide

The agentic AI security checklist: 12 controls to verify before you deploy

Staff September 4, 2026
Twelve controls to verify before you deploy an AI agent, each mapped to an OWASP ASI risk...
Read more Read more about The agentic AI security checklist: 12 controls to verify before you deploy
LLM jailbreak defense: techniques that actually stop attacks Jailbreak defense
  • Cybersecurity

LLM jailbreak defense: techniques that actually stop attacks

Staff July 28, 2026
How do enterprises secure AI data pipelines at production scale? safety
  • Cybersecurity

How do enterprises secure AI data pipelines at production scale?

Staff July 28, 2026
How companies can defend against AI model extraction attacks
  • Guide

How companies can defend against AI model extraction attacks

Staff July 23, 2026
What is a model inversion attack?
  • Glossary

What is a model inversion attack?

Staff July 22, 2026

Glossary

model router
  • LLMs

What is a model router for AI? A plain-English guide

Staff July 30, 2026
A model router for AI is a decision layer that picks which large language model answers each...
Read more Read more about What is a model router for AI? A plain-English guide
What is agentic SDLC?
  • Glossary

What is agentic SDLC?

Staff July 22, 2026
What is a model inversion attack?
  • Glossary

What is a model inversion attack?

Staff July 22, 2026
LLM system prompt leakage: what it is, how it works, and how to stop it agentic ai
  • Glossary

LLM system prompt leakage: what it is, how it works, and how to stop it

Staff July 15, 2026
What is LLM supply chain security? (OWASP LLM03:2025 explained) llm supply chain
  • Glossary

What is LLM supply chain security? (OWASP LLM03:2025 explained)

Staff July 14, 2026

Guides

The agentic AI security checklist: 12 controls to verify before you deploy
  • Guide

The agentic AI security checklist: 12 controls to verify before you deploy

Staff September 4, 2026
LLM jailbreak defense: techniques that actually stop attacks Jailbreak defense
  • Cybersecurity

LLM jailbreak defense: techniques that actually stop attacks

Staff July 28, 2026
How do enterprises secure AI data pipelines at production scale? safety
  • Cybersecurity

How do enterprises secure AI data pipelines at production scale?

Staff July 28, 2026
How companies can defend against AI model extraction attacks
  • Guide

How companies can defend against AI model extraction attacks

Staff July 23, 2026
What is a model inversion attack?
  • Glossary

What is a model inversion attack?

Staff July 22, 2026
How to prevent adversarial attacks on AI models
  • Guide

How to prevent adversarial attacks on AI models

Staff July 22, 2026
  • Home
  • What’s new in AI
  • Solutions
  • Cybersecurity
  • Learn
Copyright © All rights reserved. | by AF themes.