One Sentence on a Scanned Web Page Was Enough to Turn ARTEX's AI Pentest Agents Against Their Own Server
Endor Labs showed that a hostile site could get ARTEX, an open-source autonomous penetration testing system, to run shell commands, read other clients' credentials from shared transcripts and plant code that ran in later scans. BaaRai fixed it in ARTEX 0.7.1 on December 1.
A web page that ARTEX was asked to test could make the open-source AI penetration testing system run shell commands on its own server, according to research published December 1 by Endor Labs. From that foothold, the researcher recovered another client’s password from stored engagement records and planted code that ran during a later, unrelated scan. BaaRai, which maintains the English-language version of ARTEX on GitHub, fixed the issue in version 0.7.1 and published advisory GHSA-9fqx-7xv3-gj58 the same day.
ARTEX gives a goal to a team of AI agents, which then plan and carry out a penetration test largely on their own. BaaRai’s repository describes itself as a community continuation of the original Autumn-27 project, and is licensed under AGPL-3.0.
Endor Labs researcher Peyton Kennedy said most discussion of ARTEX had focused on what it can do to the systems it attacks. “I looked at the reverse: what a target can do to ARTEX,” he wrote.
A registration notice for scanners
The attack needs no credentials and no access to the ARTEX instance. The hostile site only has to serve text. Kennedy’s test page carried an HTML comment addressed to “automated security scanners,” telling them to register by running a command, and repeated the instruction in visible body text. The command was a curl request back to the hostile site carrying the output of id and hostname.
ARTEX’s WebFetch tool, which comes from its Norma agent runtime, converts pages to Markdown and, in recon mode, copies HTML comments into a separate section because comments often leak useful details. ARTEX wraps every tool result in nonce-tagged UNTRUSTED_OUTPUT markers to tell the model that the content is data, not instructions. That boundary was on by default during the test.
It labeled the text but did not stop the action. In the evidence run, two workers recorded the “registration” requirement as a fact about the target, and a third executed it. ARTEX’s approval gate let the call through because a tool call that matches no intercept rule proceeds unless the optional LLM judge is enabled and denies it. Kennedy noted that a curl against an in-scope host is exactly what a pentest agent does all day, which makes the malicious call hard to tell apart from normal work.
What one foothold could reach
On the default Docker Compose deployment, the server runs as root and drops agent commands to user ID 10001. That kept the instance’s JWT signing key out of reach. It did not protect the work product. Each task’s planner and worker transcripts are stored as world-readable JSONL files, and they include credentials operators declare for a task as well as full curl -u user:password command lines.
Kennedy created a second engagement against a separate target behind HTTP Basic authentication, then searched the transcripts as the agent’s user. The second client’s password came back, without the hostile site being in that client’s scope.
Every agent process also shares one writable home directory that is never cleared between tasks. Kennedy planted a Python .pth file there, a file type Python executes on every interpreter start, then launched an unrelated third task. When that task’s worker ran a bundled recon script, the hook fired.
On other documented install paths, including the prebuilt Linux, macOS and Windows binaries, the install script and containers started with a user: directive, the privilege drop does not happen. Based on code review rather than a test run, Kennedy said an injected command there could read the signing key, forge an admin token and take full control of the instance.
Severity and cleanup
Endor Labs scores the default Docker deployment at 8.2 (High) and native installs at 9.6 (Critical); BaaRai’s advisory lists 9.6. No CVE has been assigned. Affected versions are 0.7.0 and earlier. The tests used ARTEX 0.7.0, Norma 0.4.11 and OpenAI’s gpt-4.1, the only model tested, and Kennedy noted that models do not always comply but that retrying with different wording costs an attacker nothing. The report was filed on November 30 and the fixed release shipped the next day.
Upgrading does not remove anything an earlier scan left behind. Endor Labs advises operators to wipe the shared exec-home directory or rebuild the data volume, look for unexpected .pth files, dotfiles and .curlrc entries, rotate every credential declared on an instance that has scanned an untrusted target, use one instance per client and require human approval for shell commands whose arguments came from target content.
“A boundary the model is asked to respect is a hint,” Kennedy wrote. “The control that holds is one the model cannot talk its way past.”
- #ARTEX
- #Prompt Injection
- #AI Agents
- #Penetration Testing
- #Endor Labs
Author
Raj M
Contributor
AI Systems Architect is a seasoned technology leader with over 15 years of experience in the IT industry working with Fortune 500 companies. With a solid foundation in multi-agent systems, open-source LLM infrastructure, and enterprise deployment, he excels at building scalable production-grade AI platforms.