Openclaw cli: OpenClaw Vulnerable to Local File Exfiltration via MCP Tool Result MEDIA: Directive Injection
Description
OpenClaw CLI is vulnerable to local file exfiltration via injection of MEDIA: directives in MCP tool result content. A malicious or compromised MCP tool server can specify arbitrary file paths within allowed directories such as the OS temporary directory, causing OpenClaw to read and send those files to external messaging channels like Discord, Slack, Telegram, and WhatsApp without user awareness. This vulnerability affects all OpenClaw versions up to and including 2026.7.1. The flaw arises from unvalidated extraction of MEDIA: tokens, an overly broad default allowlist including os.tmpdir(), and delivery of file contents to external channels. Secondary attack vectors include fallback on image content paths and support for file:// URI schemes. The impact includes theft of sensitive temporary files and silent exfiltration to attacker-controlled channels. A patch is available to remediate this issue.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
OpenClaw CLI's tool result processing pipeline extracts file paths from MEDIA: tokens in MCP tool result text without validating the source or restricting paths beyond an allowlist that includes the OS temporary directory (os.tmpdir()). This allows a malicious MCP tool server to inject MEDIA: directives referencing arbitrary files within allowed directories, which OpenClaw then reads and sends as attachments to external messaging platforms such as Discord, Slack, Telegram, and WhatsApp. The vulnerability also supports alternative attack vectors via image content blocks with details.path fields and file:// URI schemes. The default allowlist's inclusion of os.tmpdir() is problematic because temporary directories often contain sensitive secrets and application data. The vulnerability affects all OpenClaw versions up to 2026.7.1. Exploitation results in silent exfiltration of local files to attacker-controlled channels without user notification. A patch is available to fix this issue.
Potential Impact
An attacker controlling or compromising an MCP tool server can exfiltrate arbitrary files located within the OS temporary directory or OpenClaw state directories by injecting MEDIA: directives or manipulating image content paths. This leads to theft of sensitive information such as API keys, database credentials, SSH keys, session tokens, and other application secrets stored in temporary files. The exfiltration occurs silently via external messaging channels configured in OpenClaw, enabling attackers to receive stolen data without user awareness. Automated exploitation is possible if auto-reply features are enabled. This compromises confidentiality and may facilitate further attacks.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix from the vendor to prevent local file exfiltration via MEDIA: directives. Until patched, users should consider restricting or monitoring the use of MCP tools from untrusted sources and review configurations of external messaging channels to limit exposure. No additional generic mitigations are recommended beyond applying the vendor's patch.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-GHSA-jjgj-cpp9-cvpv
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac2458312601ec6a3164079
Added to database: 10/04/2026, 12:24:35 UTC
Last enriched: 10/04/2026, 12:30:32 UTC
Last updated: 10/04/2026, 12:30:32 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.