# Open-source AI pentesting framework Cairn abused by China-nexus (CL-STA-1238) and financially motivated actors for autonomous intrusions, including a MONAILabel path traversal zero-day (GHSA-qc22-rmgc-vg94)

> Multiple vendors (Amazon, Unit 42, Gambit Security, NorForge) document threat actors running the open-source Cairn AI agent framework against real targets since mid-2026. Amazon reports a Chinese-nexus actor whose agents found and exploited an unknown path traversal flaw in MONAILabel to get a root reverse shell on an East Asian university server; Unit 42 tracks a China-nexus intelligence-collection campaign (CL-STA-1238) that breached 10 organizations.

- **Published:** 2026-11-23T22:58:09Z
- **Last reviewed:** 2026-11-23T22:58:09Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6742
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6742.png
- **ID:** TL-2026-6742
- **Severity:** HIGH
- **Category:** APT
- **Status:** ACTIVE
- **Actor:** CL-STA-1238 (China)
- **Detections:** 9 (1 shown free below) · **IOCs:** 30 (3 shown free below)

## Description

Cairn (github.com/oritera/Cairn, AGPLv3) is an open-source, general-purpose problem-solving engine built on a blackboard architecture with a fact/intent/hint graph. A server (default port 8000 under Docker Compose) holds the graph, a dispatcher schedules worker containers, and agent workers (backends: Claude Code, Codex, Pi) run an OODA loop driven by an LLM. AI penetration testing is its first validated domain. Operators supply an origin (target domains or IPs) and a goal (for example 'obtain shell access'); the agents then plan, explore and exploit autonomously. Four security firms have now documented it in real attacks.

Amazon Threat Intelligence (as summarized by Help Net Security on 2026-11-23; the Amazon post body could not be retrieved by the analyst) found a publicly hosted, unauthenticated Cairn instance whose project configuration, operator prompts and AI output point to a Chinese-nexus actor. From 2026-09-08 the agents targeted IP addresses of universities in East Asia outside mainland China, given only a target list and the goal 'obtain shell access'. Against the first university they spent roughly 16 hours on an unauthenticated Redis server (replication abuse, scripting sandbox escape, config-file writes, memory corruption), a Log4Shell attempt, an SSRF flaw in a co-located Qdrant instance used to map the internal Docker network, and credential spraying of PostgreSQL, SSH and other services. Over about six hours they built a list of about 80 real usernames from faculty directories, lab sites, archived pages and papers and tried more than 30,000 credential combinations against SSH, an admin dashboard, network storage, a VPN and the campus portal, all unsuccessful. They then exploited a previously unknown path traversal flaw in the file upload endpoint of the open-source medical-imaging AI application MONAILabel (about 11 minutes from API mapping to arbitrary file write). In a later session the agents used that write primitive to drop a Python reverse shell into sitecustomize.py, triggered a training API endpoint to spawn a new Python process that imported it, and obtained a reverse shell as root. A human operator later supplied a proxy tunnel into a second university network running the same vulnerable software; Amazon assesses the same zero-day was used there.

The MONAILabel advisory GHSA-qc22-rmgc-vg94 (published 2026-11-18, severity Critical, CWE-22, no CVE assigned yet) describes path traversal in PUT /datastore/image (caller-controlled 'image' query parameter) and PUT /datastore/label (LocalDatastore.add_image()/save_label()), affecting pip monailabel <= 0.8.5 with the fix (PR #1915) targeted at 0.8.6. Authentication is disabled by default (MONAI_LABEL_AUTH_ENABLE=False); with auth enabled the ANNOTATOR role suffices. Note: Help Net describes the vulnerable input as a 'filename parameter' while the advisory names the 'image' query parameter; the analyst treats these as the same flaw (the advisory ID is cited by Help Net).

Unit 42 (published 2026-11-12) tracks CL-STA-1238, assessed with moderate confidence as China-nexus intelligence collection: 25 Cairn operations in August-September 2026 against at least 19 organizations (semiconductor/advanced manufacturing supply chain, defense and defense policy, human-rights and civil-society groups), with confirmed unauthorized access or data retrieval at 10. The operator ran a customized Cairn fork with a custom 'AIScan Runner Skills' pack, Chinese-language tasking, an AUTHORIZATION.md per operation, and an authorization preamble prepended to worker prompts to defeat model refusals. Models used were Zhipu GLM 5.2 (13 operations), DeepSeek V4 Flash (8) and DeepSeek V4 Pro (4). Exploited weaknesses were mostly conventional: password spraying, brute-forced production credentials, authentication bypasses, IDOR, mass-assignment privilege escalation, exposed cloud APIs and older public CVEs (none named). Outcomes included unauthorized admin accounts and a persistent API token at a semiconductor company, overwrite of a live standards-ballot document via an unauthenticated cloud write, and harvesting of over one million member records plus staff password hashes at a U.S. teachers' union.

Gambit Security (2026-09-22) reports a financially motivated operator who combined Cairn (DeepSeek), Strix (GLM 5.2 then DeepSeek V4 Pro) and the Hermes agent console to compromise at least 27 online retailers, steal more than 600,000 unexpired payment cards, and plant JavaScript skimmers (eight injection methods, including S3 poisoning, Kubernetes initContainer edits and a cron job that re-appends the skimmer every two minutes). A Hermes skill wipes card data after exfiltration; one retailer lost 180 tables from over-broad cleanup. NorForge (2026-10-19) found more than 20 exposed Cairn panels (port 8000) grouped into three clusters: AIA0001 (Chinese-language, 14 panels, 1,100+ attack projects mainly against US, Japanese and Australian e-commerce), AIA0002 (English-language, 10 panels, financial theft) and AIA0003 (1 panel, exploratory, low confidence). About 10% of tasks reached their goal in just under 23 hours on average. NorForge also references a Magento chain tracked as CVE-2026-75650 ('StyleSmuggler') found in a validation lab on a worker; the analyst did not independently verify that CVE.

Defensive takeaways: the novelty is speed, persistence and scale rather than new exploits; one agent found a zero-day on its own. Patch/mitigate MONAILabel (enable auth, restrict network exposure, run unprivileged), remove default/weak credentials, harden identity controls, shrink internet-facing attack surface, and prefer high-confidence automated-response detections because agents operate continuously.

## MITRE ATT&CK

- T1595.002 Vulnerability Scanning
- T1589 Gather Victim Identity Information
- T1588.007 Artificial Intelligence
- T1583.003 Virtual Private Server
- T1190 Exploit Public-Facing Application
- T1078 Valid Accounts
- T1059.006 Python
- T1059.007 JavaScript
- T1546.018 Python Startup Hooks
- T1505.003 Web Shell
- T1136 Create Account
- T1098 Account Manipulation
- T1053.003 Cron
- T1548.003 Sudo and Sudo Caching
- T1070.006 Timestomp
- T1110.003 Password Spraying
- T1110.001 Password Guessing
- T1552.001 Credentials In Files
- T1046 Network Service Discovery
- T1056.003 Web Portal Capture
- T1090 Proxy
- T1485 Data Destruction
- T1565.001 Stored Data Manipulation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**MONAILabel Datastore Path Traversal Arbitrary File Write (GHSA-qc22-rmgc-vg94) — Exploitation** (`TL-2026-6742-SPL-001`)

Detects PUT requests to the MONAILabel /datastore/image and /datastore/label endpoints whose 'image' query parameter contains directory traversal sequences (literal, URL-encoded or double-encoded). This is the arbitrary-file-write primitive in GHSA-qc22-rmgc-vg94 that Cairn AI agents used (about 11 minutes from API mapping to file write) to overwrite sitecustomize.py and obtain a root reverse shell on an East Asian university server. TL-2026-6742 / T1190.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1595.002
- **Data sources:** nginx_access_logs, apache_access_logs, reverse_proxy_logs
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

````spl
index=web sourcetype IN ("access_combined","nginx:plus:access","apache:access") http_method=PUT (uri_path="/datastore/image*" OR uri_path="/datastore/label*")
| eval q_raw=coalesce(uri_query,""), q_dec=urldecode(q_raw)
```TL-2026-6742 MONAILabel GHSA-qc22-rmgc-vg94 traversal in the image query parameter```
| where match(q_dec,"[.][.]/") OR match(q_raw,"(?i)%2e%2e|%252e|%5c")
| stats count AS requests min(_time) AS first_seen max(_time) AS last_seen values(q_dec) AS image_param values(status) AS http_status values(http_user_agent) AS user_agents BY src, dest, uri_path
| convert ctime(first_seen) ctime(last_seen)
````

### Microsoft KQL

```kql
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where RequestMethod =~ "PUT"
| where RequestURL matches regex "/datastore/(image|label)"
| extend DecodedUrl = url_decode(RequestURL)
| where DecodedUrl contains "../" or RequestURL matches regex "(?i)(%2e%2e|%252e|%5c)"
| project TimeGenerated, SourceIP, DestinationIP, DestinationPort, RequestMethod, RequestURL, DecodedUrl, RequestClientApplication, DeviceVendor, DeviceProduct, Activity
```

### Sigma

```yaml
title: MONAILabel Datastore Path Traversal Arbitrary File Write (GHSA-qc22-rmgc-vg94)
id: a3f1c2d4-6b7e-4a58-9c21-0d5e8f7a1b01
status: experimental
description: Detects PUT requests to MONAILabel /datastore/image or /datastore/label containing path traversal sequences in the image parameter, the arbitrary file write abused by Cairn AI agents (TL-2026-6742).
references:
  - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
  - https://www.helpnetsecurity.com/2026/11/23/cairn-ai-agents-autonomous-attacks/
author: Threadlinqs Team
date: 2026-11-23
tags:
  - attack.initial-access
  - attack.t1190
  - attack.reconnaissance
  - attack.t1595.002
logsource:
  category: webserver
detection:
  selection_method:
    cs-method: 'PUT'
  selection_endpoint:
    c-uri|contains:
      - '/datastore/image'
      - '/datastore/label'
  selection_traversal:
    c-uri|contains:
      - '../'
      - '..%2f'
      - '%2e%2e'
      - '%252e'
      - '..%5c'
  condition: all of selection_*
falsepositives:
  - Security scanners or authorized penetration tests against MONAILabel
  - Client applications that legitimately upload files with unusual relative names
level: high
```

**Known false positives:**

- Authorized vulnerability scanning or penetration testing against MONAILabel hosts
- Legitimate clients uploading files with relative path components in the image parameter (rare)

**Tuning notes:** Adjust index and sourcetype to the log source in front of MONAILabel (default port 8000 behind nginx or an ALB). Make sure the reverse proxy logs the query string. Allowlist known scanner source IPs. Any hit with HTTP 2xx should be treated as a confirmed file write. Then check for new or modified sitecustomize.py files and unexpected Python child processes of the MONAILabel service. Upgrade to monailabel 0.8.6 or later, or enable MONAI_LABEL_AUTH_ENABLE=True.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Password Spraying Across Many Accounts From a Single Source (Cairn Credential Spraying) — Exploitation (locked: unlock with TL Creds)
- Payment Skimmer Injection and Two-Minute Cron Re-Append Persistence — Post-Exploitation (locked: unlock with TL Creds)
- Connections to Cairn-Linked Payment Skimmer Hosts and Script URLs — C2/Collection (locked: unlock with TL Creds)
- Log4Shell JNDI Lookup Strings in Web Requests (Cairn Agent Exploitation Attempt) (locked: unlock with TL Creds)
- Unauthorized Local Admin Account Creation or Sudo Privilege Grant on Linux (locked: unlock with TL Creds)
- Proxy Tunnelling Tools and SSH Port-Forward Tunnels on Linux — C2/Lateral Movement (locked: unlock with TL Creds)
- Python Startup Hook [indicator] or usercustomize.py Written — Post-Exploitation Persistence/Execution (locked: unlock with TL Creds)
- Traffic to Cairn Operator C2, Staging and Exfiltration Infrastructure (Unit 42, Gambit, NorForge IOCs) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 30)

Defanged, TLP:CLEAR.

- IP address: `154.44.31[.]4`
- Domain: `medbooksource[.]com`
- IP address: `82.29.129[.]54`

Full set of 30 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Open-source AI pentesting framework Cairn keeps turning up in real-world attacks (Help Net Security)](https://www.helpnetsecurity.com/2026/11/23/cairn-ai-agents-autonomous-attacks/)
- [Attackers Use Autonomous AI to Target Semiconductor, Defense and Civil Society Sectors (Unit 42)](https://unit42.paloaltonetworks.com/cairn-framework-ai-autonomous-attacks/)
- [AI Agents Are Hacking Online Retailers for $25 a Company (Gambit Security)](https://gambit.security/blog-posts/autonomous-ai-agents-online-retailers-25-a-company)
- [Inside Cairn: Open Windows into massive AI-Driven Cyber Operations (NorForge)](https://norforge.com/blog/inside_cairn)
- [MONAILabel advisory GHSA-qc22-rmgc-vg94: Path traversal in datastore upload endpoints allows arbitrary file write](https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94)
- [Chinese-nexus actors: Cairn AI agents found a zero-day on their own (Amazon Security Blog; body not retrievable by analyst, cited via Help Net Security)](https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/)
- [Cairn (oritera/Cairn) project repository and README](https://github.com/oritera/Cairn)
- [Help Net Security coverage of Unit 42 Cairn report](https://www.helpnetsecurity.com/2026/11/12/cairn-autonomous-ai-cyberattacks/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6742
