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.

In a recent development, 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.

Related:Fast but Noisy CyberStrikeAI-Assisted Attack Hits ISP.

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.

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

It has been revealed that 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.

Related:What Chasing the Holy Grail of Hacking Was Like.

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 highlights 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 remarked.

Recent findings suggest that 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.

According to recent reports, 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 notes. "Those fields then become an attack surface that could result in this prompt injection and subsequent remote code execution.".

Related:'God Mode' Flaws Could Wreak Border-Control Havoc.

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 fresh engagement or test that is run on a single instance.".

Sources indicate that 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 states. "Upgrading closes the hole but does not clean up what came through it," he explains.

Sources indicate that 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 owners," he adds.

Sources indicate that artex people also should "design on the assumption that the model can be talked into anything its input asks for," Kennedy states. 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.

Elizabeth Montalbano is freelance writer, editor, and journalist with 30 years of professional experience and a master's degree from Arizona State University. Her areas of expertise include enterprise technology, cybersecurity, business, and culture. During her long career, Elizabeth has lived and worked as a full-time journalist in Phoenix, San Francisco, and Newly introduced York City. She specializes in news coverage and analysis, using her years of experience to look at the current state of cybersecurity with a critical gaze. She presently resides in a village on the southwest coast of Portugal, where in her free time she enjoys surfing, hiking with her dogs, growing plants, and playing and performing as a singer and musician.

Takedowns alone won’t eliminate ransomware. Here’s why.

Cyberattacks on Ghanaian Banks Spark Fears of 'AI Swarms'.

Hugging Face Kills 3,500 Pages Pushing Fake Game Cheats.

Fast but Noisy CyberStrikeAI-Assisted Attack Hits ISP.

Takedowns alone won’t eliminate ransomware. Here’s why.

Cyberattacks on Ghanaian Banks Spark Fears of 'AI Swarms'.

Hugging Face Kills 3,500 Pages Pushing Fake Game Cheats.

Fast but Noisy CyberStrikeAI-Assisted Attack Hits ISP.

Check out the Black Hat USA 2026 Conference Guide for coverage and intel from β€” and about β€” the show!

Couldn’t make it to Las Vegas for Black Hat USA? We tracked the developments that matter most.

31 May – 2 June 2027 | Saudi Arabia.

Want more Dark Reading stories in your Google search results?

πŸ“Œ Read also:

β†’ Read original article