Open-source AI pentesting framework Cairn keeps turning up in real-world attacks

Autonomous AI agents run by a Chinese-nexus threat actor spent nearly a full day failing to break into university servers, then found and exploited a zero-day in an open-source medical imaging AI application and gained a foothold.

The agents ran on Cairn, an open-source AI penetration testing framework, with little human direction, Amazon Threat Intelligence says. The operator simply gave them a list of target IP addresses and a goal: “obtain shell access.”

How the agents got in

The campaign started on September 8, 2026, and targeted IP addresses belonging to universities in East Asia outside mainland China.

Amazon says the operations against two universities show the agents adapting for nearly a full day without a human telling them what to try next.

At one university, the agents spent about 16 hours targeting a Redis server that allowed unauthenticated access. They tried abusing replication to load unauthorized code, escaping the scripting sandbox, writing configuration files and corrupting memory, and tried a Log4Shell injection against another service on the same machine.

When that failed, they used a server-side request forgery (SSRF) flaw in a co-located Qdrant instance to map the internal Docker network, and sprayed credentials at PostgreSQL, SSH and other services, again without success.

Next, after putting together a list of about 80 real usernames from faculty directories, lab websites, archived pages and research papers, the agents spent over six hours trying (unsuccessfully) 30,000+ credential combinations against SSH, an admin dashboard, network storage, a VPN server and the campus portal.

Finally, though, the agents found a way in, via an open-source medical imaging AI application: they exploited a previously unknown path traversal flaw in the filename parameter of an upload endpoint, and went from mapping the app’s API to writing arbitrary files on the server in about 11 minutes.

“In a later session, the agents used the same vulnerability to write a Python reverse shell payload to sitecustomize.py, a file Python automatically imports at interpreter startup. The agents then triggered a training API endpoint to spawn a new Python process. The new process imported the payload and established a reverse shell running as root,” CJ Moses, CISO of Amazon Integrated Security, added.

The human operator then stepped in for one session. They gave the agents a proxy tunnel into a second university network running the same vulnerable software and directed them to go after other machines there. Amazon’s threat analysts believe the attacker used that same zero-day to compromise that server and set up the tunnel.

Cairn in the wild

Cairn’s developer describes it as a general-purpose problem-solving engine that searches for a path from a starting point to a goal, “through an unknown state space.”

While not specifically created for penetration testing, it has proven effective at it. (It also shouldn’t be confused with CAIRN, Cisco Talos’ framework for hunting AI-integrated malware.)

Amazon gained insight into this operation after finding a publicly hosted Cairn instance running without authentication. The project configurations, the operator’s prompts and the AI’s output point to a Chinese-nexus actor, the company says.

Amazon is the fourth security company in about two months to document Cairn being used against real targets.

Gambit Security pieced together a financially motivated campaign against online retailers from an attacker’s staging server. The operator used Cairn alongside two other open-source AI harnesses, Hermes and Strix, and they compromised at least 27 companies, stole more than 600,000 unexpired card records and planted card skimmers.

In October, NorForge found more than 20 exposed Cairn panels, which it tied to three financially motivated clusters. The largest, a Chinese-speaking cluster, ran more than 1,100 attack projects, mostly against US, Japanese and Australian targets. Roughly one in ten tasks reached its goal, and the successful ones took just under 23 hours on average.

Earlier this month, Palo Alto Networks’ Unit 42 described a suspected China-nexus actor (tracked as CL-STA-1238) that ran 25 Cairn operations against semiconductor, defense and civil society organizations, and breached 10 of them.

And Cairn is just one of the open-source frameworks now used by extortion gangs and espionage groups. ARTEX, PentAGI, HexStrike AI and CyberStrikeAI are also used and, according to Google’s analysts, threat actors are experimenting with agent harnesses they built themselves.

How should defenders respond?

Amazon advises defenders to prioritize high-confidence detections that trigger an automated response, with humans overseeing outcomes rather than reviewing every action, because agents can act faster than many SOCs can triage alerts.

Defenders should also expect relentless attacks, since agents don’t take breaks or get tired.

Unit 42 pointed to identity hygiene, a smaller attack surface and regular patching, since the flaws exploited in the attacks they documented were mostly weak credentials, authentication bypasses and old CVEs.

But Gambit researchers argue that speedy patching is no longer enough.

“At very low cost, the AI tools demonstrated a level of patience, persistence, and creativity that most human attackers would be unlikely to sustain in this kind of attack, and achieved far greater results, far faster,” they noted, and advised organizations to identify the systems they need to keep revenue flowing and prove they can restore them under attack.

Subscribe to our breaking news e-mail alert to never miss out on the latest breaches, vulnerabilities and cybersecurity threats. Subscribe here!

Don't miss