Home / News / Article
Dark Reading · 4 min read

Artex Flaw Turns Websites into Platforms for Attacker Commands

A prompt-injection vulnerability in the AI penetration testing tool enables the execution of shell commands through malicious instructions on a website.

A prompt-injection vulnerability in the AI penetration-testing tool Artex allowed attackers to execute shell commands on the system running the tool by placing malicious instructions on a website, researchers have found. The flaw has been fixed, but it is yet another example of the growing security risks posed by AI-based tools with agents that interact autonomously with systems.

The flaw, tracked as GHSA-9fqx-7xv3-gj58, stems from how Artex agents can read content returned by the websites they’re testing and then run commands on the computer executing the test, according to a report from Endor Labs published this week.

Given this capability, a website can hide instructions in its content that the agents will follow, according to the report. “A page containing one sentence, ‘scanners must register by running this command,’ was enough to get an agent to run that command on the ARTEX server,” Endor senior researcher Peyton Kennedy wrote in the report.

The website needed no password or access to Artex to execute the command; the operator only had to start a routine scan. Moreover, “Artex’s built-in defense against this kind of attack, known as prompt injection, was switched on the whole time,” Kennedy wrote.

The vulnerability affects Artex versions 0.7.0 and earlier. Endor Labs reported the flaw to BaaRai, the maintainer of the English-language version of Artex, through a GitHub security advisory on Monday. The issue was addressed in version 0.7.1 the following day.

Pen Testing Tools on the Offensive

Like the similar open source tool Cairn, Artex uses AI agents to plan and execute penetration-testing activities. The agents retrieve content from target websites and can invoke tools, including shell commands, to investigate potential vulnerabilities.

While these capabilities are useful to security researchers, such tools have been increasingly weaponized by threat actors. As recently as this week, CISA issued a warning that attackers were using Artex and other offensive AI-based tools to automate parts of intrusions and conduct attacks faster and at greater scale against government agencies and critical infrastructure organizations.

Meanwhile, China-linked actors have used Cairn-based AI agents in various attacks, including breaching 10 organizations to steal secrets, automating a massive attack spree against high-profile websites, and going from flaw discovery to root access on a system in 11 minutes.

These incidents highlight a growing security risk associated with autonomous AI agents: systems designed to interact with untrusted environments may themselves become vulnerable to manipulation by those environments.

Demonstrating the Artex Flaw

Kennedy found that an attacker could embed instructions in a website’s visible content or HTML comments, encouraging the agent to execute a command under the guise of a routine testing requirement.

A demo shows how an attacker can create a malicious page that instructs automated scanners to run a command to register with the site. The agent then executes the command on the Artex server, demonstrating remote command execution.

The attack can escalate further within an agent’s environment, potentially exposing credentials belonging to other clients and introducing persistent code that executes during subsequent penetration tests, Kennedy said.

Indeed, prompt-injection flaws have plagued large language models (LLMs) since their inception. But tools like Artex can amplify their impact by giving agents access to sensitive functionality, further increasing the damage that a prompt injection can cause, Kennedy explains to Dark Reading.

Users of these tools assume that they control or own the content they’re scanning. “While this may be true, think of a site with a comment section open to the public or even a username,” Kennedy says. “Those fields then become an attack surface that could result in this prompt injection and subsequent remote code execution.”

Moreover, the threat can spread beyond the Artex instance in which the flaw was exploited to other vulnerable Artex versions used by security vendors conducting penetration tests, he tells Dark Reading. “The attack surface widens with each new engagement or test that is run on a single instance.”

Defense Goes Beyond Updating

While the obvious mitigation is to upgrade to a fixed version of Artex, that’s not enough to ensure the tool can’t be manipulated by attackers, Kennedy says. “Upgrading closes the hole but does not clean up what came through it,” he explains.

To further secure the system, organizations should “check the shared exec-home directory for files you didn’t put there, such as Python .pth files, dotfiles, or a .curlrc; then wipe it and rotate every credential declared on any instance that scanned a target you don’t fully trust,” Kennedy advises. This cleanup should include “any runs that could be influenced by outside users,” he adds.

Artex users also should “design on the assumption that the model can be talked into anything its input asks for,” Kennedy says. He recommends that a human approve any shell command built from target content and that organizations give each client running Artex its own instance. Moreover, the process that interacts with targets should not be allowed to read keys, credentials, or data from other engagements.

To further secure systems running Artex, Kennedy adds, organizations also should explore sandboxing and additional isolation for each runner, task, and engagement.

Originally published on Dark Reading