ARTEX: when an AI pentest agent gets prompt-injected by its own target
A page scanned by the ARTEX AI pentest agent could inject commands that ran inside the operator's container, then reach other clients' credentials. Fixed in v0.7.1 on December 1, 2026.
What is this?
ARTEX is an open-source autonomous AI pentesting agent: you give it a target, and LLM-driven planner and worker agents browse, enumerate and run shell commands on their own. Released in July 2026, it quickly moved from GitHub into threat reports. According to The Hacker News (December 1, 2026), an FBI FLASH alert dated November 13 says criminal actors have used it against organizations worldwide since at least August, and Microsoft has identified several tracked groups using it.
On December 1, 2026, two pieces of research converged on the same uncomfortable result: the target can attack the attacker’s agent. Endor Labs (Peyton Kennedy) published an advisory showing that a page scanned by ARTEX can inject instructions that the agent executes as shell commands. The maintainer, BaaRai, published a GitHub security advisory and shipped v0.7.1 the same day, one day after the report (November 30). The Hacker News separately reported live demonstrations by NebuSec and Baldur Security, and a code review by Café Security Research, reaching the same conclusion.
How it works
Endor Labs describes a three-stage chain, reproduced on ARTEX v0.7.0 with the default Docker Compose deployment and OpenAI gpt-4.1:
- Indirect prompt injection to command execution. ARTEX’s web-fetch tool returns page content to the model, including HTML comments when extraction is enabled. A hostile site places an instruction, in a comment and in visible text, framed as a “registration step for scanners”. The model treats it as a fact about the target and runs it through its shell tool. Compliance is not deterministic, but retries are cheap. The two default defenses, labels marking tool output as untrusted and an approval gate with deny rules, did not stop it: a command aimed at the in-scope target matches no deny rule.
- Cross-client data exposure. Per-task agent transcripts were written as world-readable files and contained client credentials declared for other engagements. In the lab, Endor read another client’s password.
- Persistence across tasks. All agents shared one home directory that was never cleaned between tasks, so a planted Python startup file executed during a later, unrelated scan.
On the default Docker setup, agent commands run as an unprivileged user (CVSS 3.1 8.2, High). On native installs, where agents run as the server’s user, Endor’s code review indicates the injected command could read the JWT signing key and escalate to the API (9.6, Critical; not lab-verified). We deliberately omit the injected text and commands.
The Hacker News adds independent data points. NebuSec’s decoy services obtained code execution in 33 of 36 runs across six decoys with two models, while eight direct prompt-injection prompts and seventeen command-injection probes failed: the agent was tricked by plausible environmental artifacts (a cloned repo, a backup, a helper package), not by obvious “ignore your instructions” text. Baldur Security obtained a reverse shell in one documented run with GLM-5.3. Note that the sources disagree on privilege level (Endor: unprivileged uid; THN describes root in the demos) and on fix status (THN says the original author pulled the code on October 8 and that 132 forks circulated on November 19; Endor’s fix applies to the BaaRai codebase).
Why it matters
This is the textbook agent failure mode, untrusted content + tools + secrets in one context, applied to an offensive tool. A pentest agent’s entire job is to read attacker-controlled data: the target is the untrusted input. Any legitimate red team running autonomous agents carries the same risk: its own console, client credentials and findings can be compromised by the system it is testing.
It also shows that “untrusted output” labels and LLM-based approval gates are not security boundaries. Scope and command policy enforced by the model can be argued away by the very content it is analysing.
Finally, deception now works against AI attackers: decoys tuned to an agent’s reasoning got far more traction than classic payloads. Defenders should treat this as a detection opportunity rather than an invitation to hack back, which raises serious legal questions (THN notes NebuSec’s report states no authorization basis).
Defenses
For teams running ARTEX or any autonomous pentest agent:
- Upgrade to ARTEX v0.7.1 or later, and verify which codebase or fork you actually run.
- Clean up after the fact. Upgrading does not remove what a previous scan planted: purge the shared execution home and look for unexpected
.pthfiles, dotfiles and.curlrcentries. - Rotate every credential declared on the instance and treat it as exposed.
- Isolate by client and by function. One instance per engagement; the worker that touches targets must not share a filesystem, home directory or secrets with the console, model API keys or database.
- Least privilege, disposable workers. Run agent commands as an unprivileged user in a throwaway sandbox reset between tasks; make transcripts and captures unreadable from that user.
- Enforce scope outside the model. Network egress allowlists and command policies at the sandbox level, plus human approval for shell commands whose arguments derive from target content.
For defenders facing AI-driven scanning: monitor for agent fingerprints and consider decoy services for detection and intelligence, within a clear legal framework.
Status
| Item | Detail |
|---|---|
| Product | ARTEX (BaaRai) with the Norma agent runtime |
| Affected | v0.7.0 and earlier |
| Fixed | v0.7.1, December 1, 2026 |
| Reported | November 30, 2026, by Endor Labs |
| Severity | CVSS 3.1 8.2 High (default Docker), 9.6 Critical (native installs, code review) |
| Weaknesses | CWE-1427, CWE-250 |
| Forks | Original public code pulled October 8, 2026; forks may remain unpatched |
| Reference | GHSA-9fqx-7xv3-gj58, ENDOR-VUL-2026-3011 (no CVE assigned) |