Snowflake Cortex AI Agent Vulnerable to Prompt Injection Attack Allowing Malware Execution
Key Takeaways
- ▸Snowflake Cortex Agent was vulnerable to prompt injection attacks that could execute arbitrary malware on systems
- ▸The vulnerability exploited insufficient protection in the agent's command allowlist, failing to prevent process substitution techniques
- ▸Prompt injection attacks hidden in seemingly benign content (like GitHub README files) can compromise AI agents with system access
Summary
Security researchers at PromptArmor discovered a critical vulnerability in Snowflake's Cortex Agent that allowed attackers to execute malware through a prompt injection attack chain. The attack exploited a flaw in the agent's command allowlist system, which failed to protect against process substitution techniques. An attacker embedded malicious instructions in a GitHub repository's README file, causing the Cortex Agent to execute unauthorized shell commands that could download and run arbitrary code from an attacker-controlled server.
The vulnerability stemmed from Snowflake's reliance on pattern-based allowlists for commands deemed "safe to run without human approval." This approach proved ineffective against sophisticated command obfuscation techniques, specifically shell process substitution (using <(...) syntax) that could bypass the intended protections. The security community has long questioned the reliability of such pattern-matching defenses, with experts advocating for deterministic sandbox environments that operate independently of the agent layer itself.
Snowflake has since patched the vulnerability following the PromptArmor disclosure. The incident highlights broader concerns about AI agent security architecture and the risks of relying on inadequate safeguards when agents have access to system-level operations.
- Pattern-based allowlists for AI agent commands are considered inherently unreliable; deterministic sandboxes offer better security boundaries
Editorial Opinion
This incident demonstrates a critical gap between the theoretical safety measures AI companies implement and the practical vulnerabilities those measures actually prevent. Command allowlists, while appearing reasonable on the surface, offer false confidence against determined attackers who understand shell syntax and obfuscation techniques. The broader lesson here is that AI agents with system-level capabilities require architectural security controls that operate independently of the agent itself—not merely application-level restrictions that clever prompts can circumvent.


