Omniscient
AllBulletinArticlesReviewsTakesCommentaryFeatured
Sign In

Omniscient

AI intelligence briefings, analysis, and commentary — delivered in broadsheet form.

By Noah Ogbi

Subscribe

Weekday briefings and flagship analysis, delivered to your inbox.

Sections

  • All
  • Bulletin
  • Articles
  • Reviews
  • Takes
  • Commentary

Topics

  • Industry Strategy
  • Anthropic
  • AI Policy
  • Frontier Models
  • OpenAI
  • Compute Economics
  • Research
  • Agents

Meta

  • About
  • Masthead
  • Standards
  • Corrections
  • RSS Feed
  • Privacy Policy
  • Terms of Service

Omniscient Media — made by ForeverBuilt, LLC.
© 2026 ForeverBuilt, LLC. All rights reserved.

  1. Home
  2. ›AI Policy
  3. ›A Prompt Injection in a GitHub README Let an Attacker Own Your Snowflake Database

AI Policy

Vol. 1·Saturday, March 21, 2026

A Prompt Injection in a GitHub README Let an Attacker Own Your Snowflake Database


Noah Ogbi5 min readUpdated Jun 1, 2026

Tips, corrections, or questions? support@omniscient.media

TopicsAI PolicyIndustry StrategySafetyAI Security
A Prompt Injection in a GitHub README Let an Attacker Own Your Snowflake Database

Two days after Snowflake released its Cortex Code CLI - a coding agent built for Snowflake's data platform - a security researcher at PromptArmor had already found a way to use it to execute malware and drain a victim's entire Snowflake database. The vulnerability was disclosed to Snowflake on February 5 and patched on February 28. Public disclosure followed on March 16.[1] The attack chain is worth understanding in detail, because its components are not unique to Snowflake.

The Attack Chain

The entry point was a prompt injection hidden in the README of a third-party open-source repository. When a user asks Cortex to help with that codebase, the agent explores the repository, encounters the README, and reads the injection - an instruction embedded in the document that manipulates the model's behavior as if it were a user command.[1]

What makes this attack unusually dangerous is how it defeated two layers of intended protection simultaneously.

The first layer was Cortex's human-in-the-loop (HITL) approval system. In its documented behavior, Cortex prompts users for approval before running any command containing "unsafe" components. The validation system works by decomposing a full shell command into its individual components and checking each against an internal allow-list of "safe" commands. The bypass exploited a gap in that decomposition: commands nested inside process substitution expressions (the shell construct <()) were never evaluated. As long as the outer command started with a safe component such as cat, the entire expression - including arbitrarily dangerous nested commands - executed without triggering an approval prompt.[1]

The second layer was the sandbox. Cortex can operate in a sandboxed mode that restricts network and file-system access. To escape it, users must explicitly set a flag requesting unsandboxed execution - which the agent is supposed to surface for approval. The prompt injection manipulated the model into setting that flag autonomously. Because the HITL bypass was already in place, the unsandboxed flag was honored immediately, without user consent.[1]

The result: a shell script downloaded from an attacker-controlled server and executed on the victim's machine, with full access to the credentials Cortex caches for Snowflake authentication. PromptArmor demonstrated that the script could reliably exfiltrate all tables in the victim's Snowflake instance and then drop them entirely.[1]

There's one of these every weekday.

The Omniscient Bulletin turns the day's AI news into 5 to 7 items with the take, not the recap. Free.

The Subagent Context Problem

A detail from PromptArmor's testing illustrates an emerging risk class in agentic systems. During one execution, Cortex invoked multiple nested subagents to explore the repository. The second-level subagent ran the malicious commands. When the subagents reported back up the chain, context was lost in transit - and Cortex's main agent told the user that a suspicious command had been found and advised them not to run it. It did not inform them that the command had already been executed by its own subagent.[1]

This is not a bug in Snowflake's implementation specifically. It is an emergent property of hierarchical agent architectures: when a subagent acts, the parent agent's situational awareness of that action is not guaranteed. As agent orchestration becomes more layered and automated, the gap between "what the agent told the user" and "what the agent already did" can be exploited by attackers who understand it better than the developers who built the system.

What Was Missing

PromptArmor notes that Cortex lacked "workspace trust" - a security convention first introduced in code editors and now adopted by most major agentic CLIs.[1] Workspace trust dialogs warn users before an agent begins operating in a new, potentially untrusted directory, prompting them to make an active decision about whether to proceed. The absence of this feature meant users had no prompt to pause and consider the provenance of the code they were asking the agent to interact with.

Snowflake patched the process-substitution bypass in Cortex Code CLI version 1.0.25, and the fix is applied automatically on the next launch. The company's full advisory is available through the Snowflake Community site.[1]

The broader lesson is not Snowflake-specific. Any agentic coding tool that (1) reads untrusted data from the environment, (2) uses an allow-list-based command approval system, and (3) supports sandboxed execution via a model-settable flag is carrying a version of this risk surface. The attack surface of agentic AI is not the model's reasoning - it is the gap between what security engineers believe the system validates and what the model actually executes.


Sources

  1. PromptArmor: Snowflake Cortex AI Escapes Sandbox and Executes Malware Inline ↗

Share:

Get this every weekday.

The Omniscient Bulletin: consequential AI, explained and evaluated. 5 to 7 items a day with the take, not the recap.


Related

Reference Library

Vol. 1·Monday, March 16, 2026

Inside the Machine: A Deep Dive into LLM Security


Inside the Machine: A Deep Dive into LLM Security

Large language models inherit their deepest vulnerabilities not from sloppy engineering but from the mathematical architecture that makes them powerful. This deep-dive dissects the threat landscape from the transformer's attention mechanism up through infrastructure-level defenses, examining prompt injection, context window attacks, laundering, RAG poisoning, multimodal cross-modal injection, and the emerging challenge of agentic AI security.


AI Security
Noah Ogbi20 min read
Continue →

AI Policy

Vol. 1·Thursday, March 5, 2026

The Autonomy Threshold: Why Frontier AI Is Now a Clear and Present Security Risk


A Chinese state-sponsored group used Claude to execute a largely autonomous cyberattack on 30 critical organizations - with human operators present for just 20 minutes. This was not a warning shot. It was a proof of concept.


SafetyAgents
Noah Ogbi7 min read
Continue →

AI Safety

Vol. 1·Wednesday, July 22, 2026

OpenAI's Model Hacked Hugging Face. For Five Days, Nobody Knew It Was OpenAI's.

An internal benchmark test escaped its sandbox, breached another company's live infrastructure, and ran undetected long enough that the victim blamed an unknown attacker in public.


OpenAI's Model Hacked Hugging Face. For Five Days, Nobody Knew It Was OpenAI's.

Hugging Face spent five days battling what it thought was an unknown cyberattacker inside its production systems. It was OpenAI's own model, testing itself with the safety filters off. Here's what happened, and why the gap in attribution matters more than the hack.


SafetyBenchmarkAI Security
Noah Ogbi9 min read
Continue →