In short
Cairn is an open-source AI problem-solving engine whose first validated use is autonomous penetration testing. Many AI worker agents share one graph of facts and planned steps, and keep exploring until they reach a goal. Unit 42 reported in November 2026 that a China-nexus actor used a customized Cairn fork against at least 19 organizations.
Key takeaways
- What it is
- An AGPL-licensed project on GitHub that coordinates many AI agent workers through a shared fact-intent graph. Penetration testing is its first validated domain.
- How it works
- A server keeps the graph, a dispatcher schedules tasks, and worker containers run agent CLIs such as Claude Code or Codex against the target.
- Why it matters
- Unit 42 tied a customized Cairn fork to 25 operations against at least 19 organizations in August and September 2026, with access confirmed at 10.
- What Odin Research saw
- 17 Cairn endpoints on port 8000 in Monograph 20, with one confirmed controller in Hong Kong. The rest are suspected or candidates.
- What to do first
- Fix the weak spots agents find fastest: default credentials, authorization bypasses and exposed APIs. Hunt for Cairn worker traffic and containers.
What is Cairn?
Cairn is an open-source AI engine that searches for a path from a known starting point to a defined goal, using many AI agents that share one graph of facts and planned steps. Its README says autonomous penetration testing is the first domain it has been validated on.
The project lives on GitHub as oritera/Cairn, where it had about 5,500 stars on 21 November 2026. It credits the ChainReactors team and the Tencent Cloud Hackathon AI Penetration Testing Challenge (2nd Edition), where the README reports 54 of 54 problems solved and third place. Beyond penetration testing, it lists capture-the-flag solving, security assessment, vulnerability research and even mathematical proofs as fitting problems.
Cairn is a dual-use AI agent system. The README states that it is meant only for environments where you have explicit authorization. Unit 42 has since shown that attackers can run it, or a fork of it, against real organizations.
How Cairn works
Cairn uses a blackboard architecture. Instead of fixed roles or workflows, every agent reads and writes one shared board. The README names three building blocks:
- Facts: confirmed findings, such as an open service or a working login.
- Intents: planned explorations, such as testing one parameter.
- Hints: optional human guidance that agents read on their next pass.
Agent workers run an observe, orient, decide, act loop and write results back as facts. They never talk to each other directly. The project calls this coordination through the environment, or stigmergy.
Three components make up a deployment:
- Cairn Server keeps the graph consistent. In the project's Docker Compose setup it listens on port 8000.
- Cairn Dispatcher schedules tasks and manages containers. It is the only component that writes to the protocol.
- Worker containers run one project each, with several workers inside. The README lists Claude Code, Codex and Pi as worker backends, with model endpoints and API keys set in a
dispatch.yamlfile.
The README requires macOS or Linux, Python 3.12 or later and Docker. A local mode runs workers directly on the host, which the README warns gives agents the user's own permissions with no sandbox.
How attackers use Cairn
On 12 November 2026, Palo Alto Networks Unit 42 reported that an actor it tracks as CL-STA-1238 used a customized Cairn fork. Unit 42 assesses with moderate confidence that this was China-nexus intelligence collection.
According to Unit 42:
- From August to September 2026, the actor ran 25 operations against at least 19 organizations.
- Targets included 7 semiconductor and advanced manufacturing firms, 3 defense and defense-policy organizations and 4 human-rights and civil-society groups.
- The actor paired Cairn with Zhipu GLM 5.2 in 13 operations and with DeepSeek V4 Flash and V4 Pro in the rest.
- To get past model guardrails, it used a Chinese-language authorization pretext and a generated
AUTHORIZATION.mdfile. - Cairn confirmed unauthorized access or data retrieval at 10 organizations. Unit 42 lists dozens of valid credentials, more than one million exposed records at one organization and persistent administrator accounts in one production system.
The weaknesses were not exotic. Unit 42 lists authentication bypasses, insecure direct object references, mass-assignment privilege escalation, weak and default credentials, exposed cloud APIs and old public CVEs. An agent can try each of them on many targets at once. For more on this shift, see our guide to red-teaming AI agents.
What Odin Research observed
Odin Research mapped Cairn as one of seven specialized AI vulnerability agents in Monograph 20. In that study, Cairn sits in the surface-discovery stage: it builds an asset graph from DNS zones, TLS certificates and HTTP banners so that other tools have targets to test.
- 17 endpoints, all on port 8000. Each sat on its own host. The largest groups were in the Netherlands (3), Hong Kong (3) and Canada (3), then Finland (2) and the United States (2).
- Cloud hosting. The main networks were The Constant Company (4), Google (3) and OVH (2).
- One confirmed controller. A Cairn controller on Alibaba Cloud in Hong Kong was confirmed on 18 November 2026. One US instance is suspected, and the other 15 are uncorroborated candidates.
- No target activity seen. Odin saw controller infrastructure only. Nothing in the data shows that any check reached a target system.
Unit 42 also reported that a Hong Kong server hosted Cairn in the CL-STA-1238 activity. Odin Research has no evidence that its confirmed Hong Kong controller is the same server, and we do not link the two.
Most Cairn installs are likely tests, research or competition setups. A Cairn web page on its own is a lead, not a verdict.
How to detect Cairn
- Worker check-ins. Monograph 20 documents requests to
/api/v1/cairn/with anX-Cairn-Worker:header on ports 8000 or 8010. Seeing these leave your network means someone inside runs Cairn workers. - Containers and processes. Alert on the project's
cairn-worker-containerimage, on processes namedcairn-worker, and oncairn serveorcairn dispatchcommands outside approved test hosts. - Agent CLIs on servers. Coding-agent command-line tools running headless on a server, with a target list and API keys, deserve a look. See monitoring and logging for AI agents.
- Patient, wide probing. On your perimeter, agent-driven testing shows up as many small, varied requests across many paths and object IDs, often with login and ID-swapping attempts.
Monograph 20 publishes a Suricata signature for Cairn worker check-ins, a Sigma rule for unapproved agent worker processes, a YARA rule for Cairn recon queue configurations and a Sentinel KQL hunt. They are on the report page and in the Defense Kit.
How to defend against AI-driven attacks like Cairn
- Close the easy doors. Remove default and weak credentials, enforce authorization checks on every object ID, and lock down cloud APIs. These were the paths in Unit 42's case.
- Know your attack surface. Cairn starts from what it can find. External attack surface management shows you the same view first.
- Patch old CVEs. Agents retry dated public flaws at no cost. Prioritize items in the KEV catalog.
- Govern your own agents. If your red team uses Cairn, keep it on dedicated hosts with written scope and logs. The AI Agent Governance Policy Template is a starting point.
Cairn compared with other AI security agents
| Tool | Design | Typical port | Notes |
|---|---|---|---|
| Cairn | Many agents on a shared fact-intent graph | 8000 | Used by CL-STA-1238 per Unit 42; 1 confirmed controller in Monograph 20 |
| HexStrike AI | MCP server exposing 150+ tools to an AI client | 5000, 8080, 8888 | Generic Python pages make installs hard to confirm |
| AutoHunter | Headless bug-bounty recon and parameter mining | 18800 | 1 confirmed controller in Monograph 20 |
| Strix | Web and API checks from Docker sandboxes | Many high ports per host | 5 confirmed listeners on one US server in Monograph 20 |
| AutoCVE | Turns advisories and patch diffs into checks | Varies | Largest family in Monograph 20, 7 confirmed controllers |
Frequently asked questions about Cairn
What is Cairn?
Cairn is an open-source AI engine that coordinates many agent workers through a shared graph of facts and planned steps. Its first validated use is autonomous penetration testing.
Is Cairn malware?
No. Cairn is a dual-use security tool published under the AGPLv3 license for authorized use. Unit 42 has reported that an actor used a customized fork of it in real intrusions, so unexplained Cairn activity deserves attention.
Is Cairn legal to use?
Yes, on systems you own or are authorized to test, under its license terms. The README says it is meant only for environments where you have explicit authorization, and commercial use needs a separate license.
Who made Cairn?
The README credits the ChainReactors team and the Tencent Cloud Hackathon AI Penetration Testing Challenge. The repository is published on GitHub as oritera/Cairn.
Which AI models does Cairn use?
The README lists Claude Code, Codex and Pi as worker backends, with model endpoints set in a configuration file. Unit 42 reported that CL-STA-1238 paired its fork with Zhipu GLM and DeepSeek models.
What is CL-STA-1238?
CL-STA-1238 is Unit 42's name for an activity cluster that used a customized Cairn fork from August to September 2026. Unit 42 assesses with moderate confidence that it was China-nexus intelligence collection.
How do I detect Cairn?
Look for Cairn worker requests to /api/v1/cairn/ with an X-Cairn-Worker header, Cairn worker containers or processes outside approved hosts, and wide, patient probing of your web apps. Odin Research publishes matching rules in its Defense Kit.
Cairn vs HexStrike AI: what is the difference?
HexStrike AI is an MCP server that hands security tools to one AI client. Cairn runs many agent workers that coordinate through a shared graph toward a goal. Both are dual-use.
Sources
- oritera, Cairn repository, GitHub. github.com/oritera/Cairn (checked 21 November 2026)
- oritera, Cairn README. raw.githubusercontent.com/oritera/cairn/main/README.md (checked 21 November 2026)
- Palo Alto Networks Unit 42, "Attackers Use Autonomous AI to Target Semiconductor, Defense and Civil Society Sectors", 12 November 2026. unit42.paloaltonetworks.com/cairn-framework-ai-autonomous-attacks/ (checked 21 November 2026)
Related tools and terms
What is CyberStrikeAI?
CyberStrikeAI is a public AI-driven offensive security platform. It spreads its operator interface, API and agent listener across several ports on one host and exposes tools through MCP.
AI offensive toolWhat is PentAGI?
PentAGI is an open-source autonomous penetration testing system that coordinates AI agents and security tools in containers.
AI offensive toolWhat is HexStrike AI?
HexStrikeAI is a public project that exposes many security tools to AI agents through the Model Context Protocol (MCP).
AI security toolWhat is DeepAudit?
DeepAudit is an open-source AI code auditing tool. Application security teams use it to find flaws in source code.
AI security toolWhat is AutoCVE?
AutoCVE is an AI-assisted tool that turns new vulnerability advisories into HTTP checks.
AI security toolWhat is AutoHunter?
AutoHunter automates headless bug-bounty reconnaissance of subdomains, API routes and query parameters.
Odin Research
Get the rules, not just the definition
Every Odin Research report ships with verified indicators and detection rules you can load today.