PentAGI 2.2: A Self-Hosted Pentesting Crew That Had To Patch Its Own Sandbox — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

PentAGI 2.2: A Self-Hosted Pentesting Crew That Had To Patch Its Own Sandbox

VXControl shipped PentAGI 2.2 on Oct 5 with a CVE that let an injected prompt escape the worker container into the host Docker daemon. The 2.2.0 fix is the interesting part: a hardened dind attestation, dropped capabilities, and the same MKNOD trick that almost killed me years ago on a CTF box.

A team of specialized AI agents plans the work, runs nmap and sqlmap inside an isolated Docker sandbox, remembers what it learned, and hands you a PDF report. That sentence is the marketing pitch for PentAGI, an open-source autonomous pentesting platform from VXControl in Dubai. The 2.2.0 release shipped on October 5, 2026 — and the headline of the release notes is not a new model integration, it is CVE-2026-14784, a sandbox escape that the maintainers found and disclosed themselves.

That is the angle worth writing about, because the fix is the most opinionated thing in the release, and the maintainers put the CVE at the top of the changelog on purpose.

What PentAGI actually is

Before the security story: PentAGI is not a “we made an agent call nmap” demo. It is a 60 MB Go + TypeScript codebase, MIT licensed, with 4,680 forks and a v2.2.0 release that lists 10 minor tags between January 2025 and October 2026. The current release supports 13 LLM provider types — OpenAI, Anthropic, Gemini, AWS Bedrock, Ollama (local and cloud), DeepSeek, GLM, Kimi, Qwen, MiniMax, Mistral, xAI, and a custom OpenAI-compatible path that now includes Azure deployments through LLM_SERVER_API_TYPE=azure. Each provider ships with a tested ctester report in examples/tests/ so you know the success rate per agent role before you wire it up.

The agent team itself has 12 named roles: a Primary Agent that orchestrates, a Generator that decomposes the task into Subtasks, a Refiner that updates the plan after each step, a Pentester, a Coder, an Installer, a Searcher, an Enricher, a Memorist, an Adviser, a Reflector, and a Reporter. The Reflector is the one I want to flag for the discussion later — it fires when the LLM fails to produce tool calls after three attempts, and steers the agent back to a valid tool. That pattern (a recovery role that watches the dispatch loop) is exactly the kind of design choice that ages well when smaller models are pointed at it.

The memory layer is a real engineering piece, not a vector-store veneer. There is long-term memory in PostgreSQL with pgvector for embeddings, an optional Neo4j + Graphiti knowledge graph that captures hosts/services/findings as a flow-scoped graph, working memory (current task state), and episodic memory (past commands and outcomes). Chain summarization runs as a separate compiler-style pipeline — input chain, optional conversion to ChainAST, section-level summarization, oversized-pair handling, and a final QA-pair reduction — that drops context size without losing tool-call/response pairs. The defaults are committed in the README and they are honest about the trade-off (SUMMARIZER_PRESERVE_LAST=true, SUMMARIZER_LAST_SEC_BYTES=51200, ASSISTANT_SUMMARIZER_LAST_SEC_BYTES=76800 for the assistant side which keeps more recent context).

The CVE, in plain prose

CVE-2026-14784 affects PentAGI up to and including 2.1.0. The shipped .env.example set DOCKER_INSIDE=true, which mounted the host’s Docker socket into every flow sandbox. The intent was so that an agent inside the sandbox could run Docker-in-Docker — useful for spinning up additional exploit containers during a test. The bug was that with the socket mounted, an attacker who landed a prompt-injection payload inside a flow had agent access to the host Docker API. From there, the path is short: start a privileged container, mount /, compromise the node — PentAGI itself included.

The README’s prose on this is unusually clear:

With DOCKER_INSIDE=true, as the shipped .env.example set it, the host Docker socket was mounted into every sandbox, so an agent steered by prompt injection could take over the host. Prompt injection cannot be closed completely — resistance depends largely on the model’s instruction following and generalization — so this release concentrates on containing whatever runs in the sandbox.

That last sentence is the framing worth sitting with. The maintainers are not claiming they fixed prompt injection. They are claiming they made the blast radius of a successful injection narrow enough that the operator can still detect and contain it. The rest of 2.2 is the engineering that backs that claim.

The fix, layer by layer

There are four layers to the hardened worker that show up in both the release notes and the README. I want to walk through them because each one tells you something about what “container isolation” actually costs.

1. Capability drop with explicit allow-list. Worker containers drop every Linux capability by default and add back only what they need. Two specific cases are called out: MKNOD is withheld, because creating device nodes is the historical escape hatch that has popped CTF players (and real attackers) for years; SYS_PTRACE is added, because legitimate tooling — debuggers, ltrace, strace — needs it. A process limit (pids.max or the equivalent) is added to guard against fork bombs. The general agent tool-call limit (MAX_GENERAL_AGENT_TOOL_CALLS=100) and the limited agent limit (MAX_LIMITED_AGENT_TOOL_CALLS=20) remain the final hard guardrail even with monitoring on.

2. No host socket, by default. DOCKER_INSIDE now defaults to false. To get nested Docker, you must set DOCKER_INSIDE_HOST to a daemon separate from the one running PentAGI — the “hardened dind” pattern. The relevant env vars read like a deployment guide, not a feature flag:

DOCKER_INSIDE=true
DOCKER_SOCKET=
DOCKER_INSIDE_HOST=tcp://10.0.0.5:3376
DOCKER_INSIDE_TLS_VERIFY=1
DOCKER_INSIDE_CERT_PATH=/etc/docker/dind/certs/client
DOCKER_INSIDE_POLICY_TESTS=true

PentAGI injects these into every worker container as DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH (the _INSIDE_ segment is dropped) and bind-mounts the cert directory read-only, so docker works inside the sandbox with no further setup. The mount-no-socket detail is small but important — the README explicitly warns that bind-mounting DOCKER_SOCKET has two failure modes, the second of which is the CVE: the agent gets the host daemon and owns the node.

3. Startup attestation. With DOCKER_INSIDE_POLICY_TESTS=true, PentAGI launches a worker exactly as a flow would and verifies from inside it that the daemon is not its own, that 27 host-escape requests are refused, and that 7 legitimate operations work. If a check fails, agents get no Docker access and PentAGI keeps running. The “27 refused / 7 allowed” breakdown is in the release notes — those are the test fixtures the maintainers committed, and they tell you exactly what behavior they are betting the sandbox on. This is the part of the fix that I think more multi-agent frameworks should adopt: instead of trusting that the sandbox is configured correctly, run the sandbox’s own test cases against it before any user flow gets scheduled.

4. Worker node kit. The hardened worker is not just config — the repo ships a Docker-in-Docker kit in examples/guides/worker_node.md: a fail-closed OPA policy, a seccomp profile, a cleanup timer, and the policy tests themselves. The pattern that runs on a real production deployment is “PentAGI control plane on one node, hardened dind on a second node, no shared credentials, OOB port range isolated to the worker.” This is what the maintainers mean by “two-node architecture” — not “two VMs for redundancy,” but “split the trust boundary so the agent can never reach the orchestrator’s host kernel.”

The closing line of the CVE section is the one I keep coming back to: “the remaining control is yours: stopping a flow ends the commands it started in the sandbox and finishing it removes the sandbox — finish flows you no longer need.” That is a request, not a guarantee. It assumes the operator is willing to clean up. In a busy pentest rotation, that means the cleanup story is part of the deployment — not the platform’s job.

What 2.2 also ships, briefly

The CVE is not the only thing in 2.2.0. The release notes are dense enough that I want to flag the items that are easy to miss but matter for anyone integrating the platform:

  • LangChainGo upgrade from v0.1.14-update.5 to update.8 — this is the actual reason the new provider set works without workarounds. Reasoning controls are now sent in each model family’s native form (adaptive thinking, effort levels, thinking budgets, real “off”), and combinations a vendor would reject are caught before the request. Agent chains are compacted to the model’s known context window before each call, which is the right place to enforce context bounds rather than hoping the upstream API does it.
  • LLM_FALLBACK_PROVIDER — a failed call is retried on a second configured provider, with the switch recorded in the trace. This is the simplest cross-provider resilience story I’ve seen shipped this year. Most platforms either don’t fail over, or fail over with enough delay that the user notices.
  • Anthropic workload identity federation — PentAGI exchanges a Kubernetes, GitHub Actions, or other OIDC token for a short-lived Claude token. The use case is air-gapped CI without a long-lived Anthropic API key. This is unusual to see in an open-source pentest platform and tells you the maintainers have shipped into enterprise CI.
  • Unified web_search tool — agents send a query with an intent (links, answer, research, or exploit) and a per-intent fallback chain picks the engine. Engines orchestrated under the hood (when configured): Google, DuckDuckGo, Searxng, Tavily, Traversaal, Perplexity, Firecrawl, Sploitus, and an opt-in internal browser-analytics engine. A failing engine falls through to the next instead of handing the model an error it mistakes for an answer. The fix for “Google Custom Search was sending unauthenticated requests” is also in this section, which is the kind of detail that gets buried in bigger refactors.
  • TENANT_ID for multi-instance deployment — let several installations share one PostgreSQL, one worker node, one Neo4j/Graphiti, and one Langfuse by namespacing schemas, containers, graph ids, auth keys, cookies, and telemetry. An empty value changes nothing. The validation regex (^[a-z][a-z0-9_]{0,31}$) is in backend/docs/config.md and an invalid TENANT_ID aborts startup rather than being silently normalized — the right call, because the alternative is two installations thinking they share a database when they don’t.
  • edit_file — agents patch files with a unified diff instead of rewriting them whole. Small change, real effect on token spend for long-lived flows.
  • Markdown editor for prompts and templates rebuilt on TipTap’s official Markdown engine. Tables, code and template highlighting, Rich/Raw toggle, and Go-template pipelines inside table cells survive the round trip so an edited prompt still passes validation. This is the kind of UI investment you only see in projects with a real operator base.

The vLLM + Qwen3.5-27B-FP8 story

If you want a fully local PentAGI — no cloud API keys, no telemetry leaving your network — the canonical recipe is examples/guides/vllm-qwen35-27b-fp8.md, and it is the most concrete deployment guide in the repo. The numbers:

  • Qwen3.5-27B is a 27B-parameter dense model from Alibaba with a hybrid architecture (75% Gated DeltaNet layers, 25% Gated Attention layers), 262K native context, up to 1,010,000 tokens via YaRN, FP8 W8A8 quantization with block size 128.
  • Tested hardware: 4× RTX 5090 (128 GB total, ~30 GB/GPU at 0.75 utilization), 1× H100 SXM, 2× H100 SXM, or 4× A100 80GB (W8A16 fallback).
  • Performance: ~13,000 TPS prompt processing, ~650 TPS completion, 12 concurrent flows with stable performance, full 262K context.

The vllm serve command they ship is worth quoting because it has knobs you don’t see in most recipes:

NCCL_P2P_DISABLE=1 vllm serve Qwen/Qwen3.5-27B-FP8 \
  --tensor-parallel-size 4 \
  --max-model-len 262144 \
  --max-num-batched-tokens 4096 \
  --block-size 128 \
  --gpu-memory-utilization 0.75 \
  --language-model-only \
  --enable-prefix-caching \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_xml \
  --attention-backend FLASHINFER \
  --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":1}' \
  -O3

Three of those flags are not obvious. --language-model-only skips the vision encoder and gains 2–4 GB of KV-cache room. --tool-call-parser qwen3_xml (not qwen3_coder) is the fix for an infinite !!!! bug on long contexts — explicitly called out in the troubleshooting section. --speculative-config with num_speculative_tokens=1 is the only stable MTP setting in current nightly vLLM (the README warns that >1 is unstable). And NCCL_P2P_DISABLE=1 is mandatory for Blackwell GPUs (RTX 5090) with tensor parallelism > 1 — without it you get NCCL hangs. The troubleshooting section is the part of the guide that actually de-risks a first deploy, and it is unusually specific.

PentAGI itself ships pre-configured YAMLs for this setup: examples/configs/vllm-qwen3.5-27b-fp8.provider.yml (thinking mode on) and vllm-qwen3.5-27b-fp8-no-think.provider.yml (thinking mode off via chat_template_kwargs). The thinking-mode config enables <think> tags for primary agents and uses temp=0.6 for coding agents; the no-think config uses temp=0.7 for general tasks and temp=1.0 for reasoning. Both are drop-in to PentAGI’s Settings → Providers.

What I find load-bearing about the supervision design

PentAGI’s “Advanced Agent Supervision” section is the design that aged best when the v2.2 deployment guide was published. Two beta features — both off by default — quietly do the thing that almost every small-model pentesting demo I’ve seen fails to do.

Execution Monitoring. Adviser agent (mentor) is automatically invoked when execution patterns indicate potential issues. Pattern detection thresholds: identical tool calls (default 5), total tool calls (default 10). The threshold values are configurable. When triggered, the tool response is enriched with a <mentor_analysis> block alongside the original result. The performance impact is real — 2–3x execution time, 2–3x tokens — but the result quality improvement is 2x based on internal testing with Qwen3.5-27B-FP8. The intended use case is exactly the failure pattern small open models hit: looping on a single approach without realizing it.

Intelligent Task Planning. Planner (adviser in planning mode) generates 3–7 specific, actionable steps before specialist agents begin work. The plan is built from a context analysis pass through the Enricher agent, then wrapped in a <task_assignment> structure that includes the plan and execution instructions. Scope creep is contained by re-emphasizing the current subtask’s objective after each step. The performance overhead is planning itself, with a meaningful improvement in completion rates on complex pentest flows.

The combination is the right call for sub-32B models. What is interesting is the maintainers’ own framing of the trade-off: the adviser can use the same base model with maximum reasoning mode (their vllm-qwen3.5-27b-fp8.provider.yml is the example) or a different, stronger model, and the system documents both paths. The README warns that for production local deployments, you really do want both features on. That is an honest answer to the question “can a 27B model do autonomous pentesting” — yes, if you spend 2–3x the tokens to watch it while it works.

Trade-offs and what 2.2 doesn’t fix

PentAGI today is an autonomous and assistant-guided penetration testing platform, not a CALDERA-style Breach and Attack Simulation (BAS) or adversary emulation product with predefined campaigns. BAS-like agent-authored attack scripts are explicitly called out as conceptual or future work, not implemented today. If you need atomic-red-team-style predefined adversary emulation, PentAGI is the wrong tool — CALDERA, Stratus Red Team, or Atomic Red Team itself are the right tools, and PentAGI doesn’t pretend to be one of them.

The flow report UI today supports web view, copy to clipboard, Markdown download, and PDF download. JSON flow-report export is not documented as a supported output format. If your downstream tooling ingests flow reports as JSON for SIEM correlation, you’ll need to write a small extractor over the Markdown form. This is a real gap for any SOC integration story and it is in the README explicitly — which is a small but meaningful signal.

Self-hosted engines such as llama.cpp, SGLang, and vLLM usually require a specific tool-call parser and a matching chat template to produce correct tool-call output. If the parser is missing or mismatched for the model you serve, tool-call arguments can come back corrupted. Compatibility depends on the backend’s tool-call/function-call behavior, not on PentAGI alone — not every llama.cpp or SGLang setup produces valid tool calls out of the box. This is the standard small-model-serving gotcha, and PentAGI at least names it. The Qwen3.5 deployment guide’s --tool-call-parser qwen3_xml line is the concrete answer for the most common case.

The reverse proxy section in the upgrade notes is the kind of operational detail that bites teams in production: you must set TRUSTED_PROXIES, or every user shares the proxy’s address and one burst of failed logins locks everyone out for 15 minutes. The 2.2.0 session-throttling change makes this real.

Finally, the upgrade itself is not zero-cost. Eight database migrations apply automatically at startup. Session cookies from before 2.2.0 are refused, so everyone signs in again after the upgrade. Scripts that logged out via GET must be updated to POST /api/v1/auth/logout. OpenAI retires o1, o3-mini, o4-mini, and gpt-4.1-nano on 23 October 2026, and o3 and gpt-5/-mini/-nano on 11 December 2026 — defaults moved to newer generations, so any deployment relying on the old defaults will need a provider profile update. None of this is hidden, all of it is in the release notes, but a production deployment that didn’t read the upgrade notes will have a bad day.

References and where to dig further

What I’d want to know next is whether the 27 host-escape requests and 7 legitimate operations in the policy test fixtures get committed as a separate test file, or whether they’re baked into the binary. If the maintainers put those fixtures under tests/ and run them in CI on every PR, the hardening has a chance to survive future refactors. If they’re in main but not on every-PR, then the next person who tweaks the worker container config is the next CVE waiting to happen.

Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.