DEV Community

MadeByBrain
MadeByBrain

Posted on Originally published at madebybrain.hashnode.dev

ArtexPot: why your agent's runtime is the real attack surface

A security team at NebuSec published ArtexPot, a set of honeypots that take over an autonomous pentest agent while it attacks them. The interesting part for us is not the offense. It is that they never used prompt injection. They abused what an agent does with the files it downloads, and that applies to every agent with a shell and a network connection.

What changed

NebuSec ran unmodified ARTEX 0.3.15, an open-source autonomous pentest agent, against seven fake targets. In their write-up, the first six honeypots gave them code execution as root inside the agent's container in 33 of 36 runs. The fastest took 27 seconds. A seventh honeypot went 8 for 8.

Direct prompt injection did not work: NebuSec reports 0 for 8 in that part of the evaluation.

What worked instead were three patterns:

  • A trusted tool fails. The agent used git-dumper to recover an exposed .git/ directory. The final checkout read a hostile .git/config, and NebuSec says it bypassed the tool's sanitizer. They say they reported the bypass to the maintainer on Nov. 28, 2026.
  • The runtime executes the data. Python pickles, a hidden form field the agent is tempted to decode, and .pyc files in __pycache__. Every .py file was clean, but a .pyc in __pycache__ was not.
  • Real loot behind a risky step. A compiled PoC helper, a bundled ops repo helper and a private SDK. The agent could see the risk and ran the code anyway.

The write-up also names a design flaw that matters for operators: parallel workers do not share warnings in real time. If one worker spots a trap, another only hears about it on the planner's next cycle, and only if the planner passes it on.

Why it matters in production

If your agent runs shell commands, pip install, git clone or joblib.load on things it found on the internet, you have the same exposure. The model's judgment is one layer, and the research shows it is a leaky one. NebuSec says gpt-5.6-sol audited Python pickles like a veteran analyst and still fell to almost every other honeypot.

Two details are worth keeping in mind:

  • Reviewing source is not reviewing execution. A .pyc can match the hash of a clean .py and still run something else. I reproduced the mechanism with a harmless demo (see below).
  • Blast radius is decided by the container, not by the prompt. NebuSec describes ARTEX as running backend, workers and every generated command in one root container, with the operator's API key and database credentials in the environment and open outbound network access. Take that as a checklist of what not to copy.

For EU deployments there is a data protection angle too. An agent that processes customer documents and also fetches third party artifacts should not hold both in one trust boundary.

What to do now

These are standard isolation steps, taken from the write-up's recommendations for agent builders and from Python's own documentation. They are not specific to ARTEX.

  1. Run tasks that touch untrusted artifacts in a disposable container, as a non-root user, with strict egress rules.
  2. Keep secrets out of worker environments. Pass a scoped token per task, not the whole .env.
  3. Never unpickle untrusted data. Python's docs say so explicitly. Ask for JSON or another data-only format.
  4. Before running someone else's Python project, remove precompiled bytecode:
find . -name "__pycache__" -type d -prune -exec rm -rf {} +
python3 -B your_script.py
Enter fullscreen mode Exit fullscreen mode

Note that -B only stops Python from writing new .pyc files. It does not stop it from reading existing ones, as my test shows.

  1. Treat git config, credential_process, ProxyCommand and build backends in a downloaded repo as code, because they are.
  2. If you run parallel workers, share a deny list in real time. A warning that reaches the planner on its next cycle is too late.

Caveats

This is a vendor research report, not an independent audit. The numbers come from NebuSec's own lab setup with two specific models, and I did not run the honeypots myself. NebuSec says it reported the git-dumper bypass to the maintainer on Nov. 28, 2026, and I cannot confirm whether it has been fixed.

My own test covers only the Python mechanism: a checked-hash .pyc executing different code than the source next to it, and pickle.loads calling a function chosen by the data. Both are documented behavior, not a vulnerability.

ArtexPot is licensed PolyForm Noncommercial and the authors state it is for research and authorized use only. The useful takeaway for defenders is the isolation checklist, not hacking anyone back.

Sources


Field Notes is a short series by MadeByBrain about what changes in the AI agent tooling we run in production every day. Researched and drafted with AI assistance (Hermes Agent), fact-checked against the linked sources and reviewed by Steffen Hartmann.

Top comments (0)