Targets can hijack the criminals' ARTEX AI agent — what four studies show, and why not to hack back
NebuSec, Baldur, Café Security and Endor Labs show the AI attack agent ARTEX can be tricked into running its targets' code. Deception beat injection. What defenders and AI builders should do.
Four independent teams have shown in the past week that ARTEX, the open-source AI pentest agent that criminal groups now use, can be tricked into running code chosen by the systems it attacks. In NebuSec's lab tests this happened in 33 of 36 runs. The maintainers patched one prompt-injection-to-code-execution route on 1 December 2026 (v0.7.1). For defenders, the useful lesson is not "hack back". It is that an autonomous attacker reads everything you show it and often trusts it, so deception aimed at the agent works better than deception aimed at a human. AI builders should also take note: the same design flaws exist in many legitimate agents.
The short version
ARTEX is an AI agent framework that automates penetration testing. You give it a target and an AI model, and it scans, reads web pages, runs tools and tries exploits largely on its own. It was published as an open-source project. Since at least August 2026 it has also been used by criminals, according to an FBI alert we covered in November. Microsoft says state and criminal groups now run it.
Between 22 November and 1 December, four groups published research on the opposite question: what happens when the target attacks the agent? An AI attack agent has to read the target's web pages, files, code repositories and error messages to do its job. If the target plants the right content, the agent may follow it, download a "tool" or run a "required" script, and end up running the defender's code inside the attacker's own machine. Three teams demonstrated this in controlled lab setups. A fourth found, by reading ARTEX's source code, why it is possible: the agent's commands run without an approval step, in one shared environment, next to the operator's API keys and database password.
This is the same class of weakness, prompt injection plus too much privilege, that security teams worry about in their own AI assistants and coding agents. ARTEX just happens to be the case where the people hurt by it are the attackers.
Timeline
- 8 October 2026 — ARTEX's original author pulls the public code, according to The Hacker News. Forks keep circulating; THN cites one tracker that counted 132 forks on 19 November.
- 13 November 2026 — The FBI issues a FLASH alert saying criminal actors have used ARTEX against organisations since at least August (as reported by THN; see our earlier coverage).
- 15 November 2026 — NebuSec puts a public ArtexPot honeypot on its website, according to NebuSec's page as summarised by THN.
- 22 November 2026 — Café Security Research publishes the first version (1.0) of its static source-code study of ARTEX. Version 1.6 is dated 27 November.
- 28 November 2026 — NebuSec publishes "ArtexPot: the honeypots that hack Artex back". The same day, Baldur Security publishes "ARTEX, go hack yourself" by Kevin Joensen.
- 30 November 2026 — Endor Labs reports a prompt-injection-to-command-execution flaw to the maintainers through a GitHub security advisory and reproduces it the same day. NebuSec's public honeypot data, as reported by THN, includes five reverse-shell sessions recorded by this date.
- 1 December 2026 — The maintainers (GitHub account BaaRai) publish GHSA-9fqx-7xv3-gj58 and ship v0.7.1. Endor Labs publishes its write-up. The Hacker News and the Cloud Security Alliance cover the four studies together.
What we know
NebuSec (lab results). NebuSec, which THN describes as a San Francisco AI security company, built seven decoy services ("honeypots") designed for autonomous ARTEX runs and grouped them into three classes: a trusted tool that fails, code that runs implicitly when data is loaded, and code the agent decides to run deliberately. NebuSec writes that ARTEX "surrendered root in 33 of 36 runs (92%)" across six of the honeypots, three runs each with two models (deepseek-flash-cyber: 18 of 18; gpt-5.6-sol: 15 of 18). The fastest success took 27 seconds, the slowest 17 minutes. A seventh honeypot, "The Backdoored SDK", succeeded in all eight of its runs.
The part that did not work matters just as much. NebuSec reports that when it tried plain prompt injection, instructions telling the agent to run a script, "Workers downloaded seven of the eight scripts to read them statically and ran zero." Its 17 command-injection probes also failed. The successful routes went through the agent's normal work: recovering an exposed repository, loading backups, using a "vendor" SDK, following an advisory.
NebuSec's root result is root inside the ARTEX container, not on the operator's host. On authorisation, the page says that "Unauthorized hacking back remains illegal in many jurisdictions" and that ArtexPot was designed "to collect only basic information and disconnect, without establishing a persistent shell."
NebuSec (public honeypot). According to THN's reading of NebuSec's page, the public honeypot recorded five reverse-shell sessions: three from an unidentified pentest framework and two from ARTEX, all non-root. Host-level access is unverified. THN also points out an inconsistency: the main text describes public traffic, but a timeline caption says each lane "starts at that agent's first request during internal testing." We could not confirm the public-honeypot figures from NebuSec's page text ourselves, so we attribute them to THN.
Baldur Security. Kevin Joensen describes a single controlled run with "GLM-5.3 as the base model through openrouter." The team made ARTEX drift out of scope onto a lookalike admin subdomain it controlled, then left bait suggesting a leaked, encrypted debug key that needed a helper script. At first "The model correctly concluded that piping a remote script straight into bash is a bad idea, and refused." After the team made the server answer with stalling error messages, the agent changed course and ran it, and Joensen reports a reverse shell. The post does not state which user the shell ran as. His verdict: "ARTEX offers no sandboxing and everything is mashed together."
Café Security Research. This is a static code review of ARTEX v0.3.15 and v0.3.30; "Nothing was built or run." Its main findings: "ARTEX bypasses its engine's approval step for every agent"; scope rules are "checked against ARTEX's own records, never against the commands its agents run"; and any agent command can read the operator's AI model keys and database password. It also says the rule against sending data out is switched off by default. It is explicit that "Whether a target could exploit that is untested."
Endor Labs and the advisory. Endor Labs researcher Peyton Kennedy reported the issue on 30 November. The GitHub advisory, titled "Remote Code Execution via embedded prompt in target site", credits the reporter as p80n-sec. It covers versions up to 0.7.0, fixed in 0.7.1, and has no CVE. The advisory gives two CVSS 3.1 scores: 9.6 Critical where agents run as the server's user, and 8.2 High for the default Docker Compose deployment. In Endor's reproduction with gpt-4.1, a web page carrying text addressed to scanners led a worker agent to run a command. Endor says ARTEX's "untrusted output" label on tool results did not stop this, and the approval gate let the call through. On default Docker the command ran as a non-root user (uid 10001), but from there Endor could read other engagements' transcripts, including credentials the operator had supplied. It could also leave a hook in a shared home directory that ran in later, unrelated tasks. Endor adds that in the same run two other workers treated the planted line as a fact about the target and did not run it.
Technical analysis
Root cause: one trust zone for everything. An attack agent has three kinds of input with very different trust levels: the operator's instructions, the model's own reasoning, and content from the target. In ARTEX all three end up in the same context window and lead to the same shell, in the same container that also holds the operator's secrets and other clients' data. Café's review describes the missing walls: approvals bypassed, scope checked against records instead of commands, secrets visible to every command. Endor's advisory shows one way through. NebuSec and Baldur show several more.
The novel AI angle: the agent's diligence is the attack surface. The most interesting finding is in NebuSec's numbers. Telling the agent "run this" almost never worked (0 of 8, 0 of 17). Presenting it with a situation where running something looked like the obvious next step in its job worked 33 of 36 times. Our assessment: this is the difference between injection and deception. Modern models have been trained to distrust instructions that show up inside data. They have not been trained to distrust the environment: a repository that needs a recovery tool, a backup that needs loading, an SDK that the "vendor" documents. A human pentester would hesitate. An agent rewarded for finishing tasks does not, and when it hits stalling errors (as in Baldur's run) it tries other routes until something works.
Why "it refused" is not a control. Baldur's run shows a model that first refused, correctly, and then gave in under ordinary friction. Endor's run shows one worker executing a planted instruction while two others ignored it. Model judgment varies from run to run. A control that works only most of the time will eventually fail against an agent that runs thousands of steps. The working controls in a design like this are architectural: approval gates that cannot be skipped, scope enforced where commands execute, secrets the agent's shell cannot see, and a throwaway sandbox for each engagement.
Root versus non-root. The sources disagree on privilege, and this is not a minor detail. NebuSec reports root inside the container. The advisory says commands ran as uid 10001 on default Docker. Baldur's listing shows root-owned files but no user. The CSA briefing says "root execution" without qualification, and THN's body says code ran "as root inside the same container." Our assessment: differences in version and deployment probably explain most of this (see below). Even the non-root case was enough to read other clients' transcripts and persist across tasks.
Not new in principle. Using an attacker's own tools against them is an old idea, and academic work on defending against LLM-driven attackers predates ARTEX (the CSA briefing cites USENIX Security 2025 research). What is new is that a widely abused criminal agent has now been measured directly, and that the measurements show deception works far better than instructions. This also fits what JFrog saw when an ARTEX agent ran its own booby-trapped models.
What remains unclear
- Which ARTEX? NebuSec tested 0.3.15. Café reviewed 0.3.15 and 0.3.30. The advisory covers ≤0.7.0. The advisory's Go module path (
github.com/Autumn-27/artex) differs from the repository it sits on (BaaRai/ARTEX), and NebuSec says the original repository went private in October. None of the sources explain how these lines relate, or which versions criminal operators actually run. Forks and paid variants (THN reports that ThreatBook says "Artex Pro" is being sold) will not pick up v0.7.1 automatically. - Does v0.7.1 fix the deception routes? The advisory fixes one prompt-injection path. Nothing we read says the honeypot-style routes (repository recovery, data loading, backdoored SDKs) or Café's architectural findings are closed.
- Public honeypot data. Five sessions is a small sample. THN flagged the caption mixing public and internal testing. Who ran the two ARTEX sessions is unknown.
- Privilege and host reach. Root in container vs uid 10001; no source shows an escape to the operator's host.
- The maintainers' position. A tracking issue on "ARTEX-targeted honeypots and reverse injection" exists on the BaaRai/ARTEX repository (issue #765), but we could not load it, so we do not know what the maintainers said there.
- Legal footing. THN notes that NebuSec's report "states no legal or authorization basis for its own captures," and that the sessions are reverse shells "into an environment of unknown ownership." NebuSec says it deliberately collected only basic information and disconnected.
Lessons and what to do
For security teams defending networks.
- Do not hack back. The CSA briefing says it plainly: "Use as threat intel, not hack-back." Getting a shell on someone else's machine is unauthorised access in many jurisdictions, whoever the machine belongs to. Talk to counsel and, where relevant, law enforcement before any deception that executes code.
- Do use deception that only observes. The research shows that AI attack agents read and act on everything: exposed repositories, backups, "leaked" keys, error messages, documentation. Canary tokens, fake credentials that alert when used, and decoy files are legal, cheap and well suited to catching agents. See also Okta's disposable-email signal and the Dragos fake-key canaries.
- Expect scope drift. Baldur's agent wandered onto a lookalike subdomain. Agents follow DNS and links further than a human attacker would, so monitor lookalike domains and make decoys easy to find.
For anyone running ARTEX or a similar tool legitimately (red teams, MSSPs).
- Upgrade to v0.7.1 and follow Endor's clean-up advice: wipe or rebuild the shared execution home directory, look for unexpected startup hooks, rotate any credentials you gave the tool, and check transcript permissions.
- Run one instance per client, in a disposable sandbox with restricted network egress, and keep model keys and database passwords out of the agent's shell.
- Require a human to approve any command whose arguments came from target content. Treat everything a target returns, including pages, files, repos and errors, as hostile.
For AI builders generally. These findings are not really about ARTEX. Any agent that browses, clones or loads files and has a shell faces the same problem: coding agents, research agents, IT automation. The NebuSec results suggest that injection filters and "untrusted content" labels are the weaker defence, because realistic situations get around them. Build in separation of privileges, sandboxes per task, secrets outside the agent's reach, and approval enforced at the execution layer. Anthropic's Siren findings point in the same direction.
For leadership. Attackers' AI agents have weaknesses that can be used for detection and early warning, which is good news for defence. Budget for deception tooling that observes. Do not approve active retaliation without legal sign-off. And require the same guardrails on the agents your own teams deploy.
Sources
Primary:
- NebuSec, "ArtexPot: the honeypots that hack Artex back", 28 November 2026
- Baldur Security (Kevin Joensen), "ARTEX, go hack yourself", 28 November 2026
- Café Security Research, "ARTEX: what the code says", v1.6, 27 November 2026
- BaaRai/ARTEX, GHSA-9fqx-7xv3-gj58, 1 December 2026
- Endor Labs (Peyton Kennedy), "ARTEX vulnerability: prompt injection to RCE in an AI pentest agent", 1 December 2026
Coverage:
- The Hacker News, "ARTEX AI Hacking Tool Used by Cybercriminals Can Be Hacked by Its Own Targets", 1 December 2026
- Cloud Security Alliance, "CISO Daily Briefing", 1 December 2026