Huny's Dev Blog
huny.dev

How Autonomous Cairn AI Agents Found and Exploited the MONAI Label Zero-Day (CVE-2026-133968) in 11 Minutes: sitecustomize.py RCE Chain, the PyPI Release Gap, and GPU Server Confinement

An architectural analysis of CVE-2026-133968 (GHSA-qc22-rmgc-vg94, CVSS 9.8), the critical MONAI Label path-traversal zero-day autonomously discovered and exploited in 11 minutes by AI agents running on the Cairn framework. Examines the two-stage sitecustomize.py + /train subprocess root RCE chain, the supply-chain release gap between GitHub tag 0.8.6 (PR #1915/#1942) and PyPI 0.8.5, and OS-level filesystem confinement for AI GPU servers.

Hun Jang
Hun Jang Nov 24, 2026

Autonomous Cairn AI Agent Discovery & Exploitation of MONAI Label Zero-Day (CVE-2026-133968 · GHSA-qc22-rmgc-vg94): 11-Minute PUT /datastore/image Path Traversal → sitecustomize.py Injection + /train Subprocess Root RCE Kill Chain and the PyPI 0.8.5 vs. GitHub 0.8.6 Release Gap (Conceptual Illustration)

The defining lesson from the wild exploitation of MONAI Label (CVE-2026-133968, GHSA-qc22-rmgc-vg94, CVSS 9.8)—where autonomous AI agents coordinated by the open-source Cairn framework independently discovered a zero-day in 11 minutes and achieved root remote code execution—is twofold: (1) enabling authentication (MONAI_LABEL_AUTH_ENABLE=True) does not block exploitation by users holding the standard ANNOTATOR role, and (2) a critical open-source packaging gap exists between the merged GitHub source fixes (PR #1915, PR #1942, tag 0.8.6) and the unpatched 0.8.5 package still served by default on PyPI and Docker Hub, making network isolation, read-only Python site-packages confinement, and commit-pinned source builds mandatory.

On November 20, 2026, Amazon Threat Intelligence (authored by CJ Moses, CISO of Amazon Integrated Security, on the AWS Security Blog) disclosed an investigation into a threat actor that tasked autonomous AI agents running inside the open-source Cairn penetration-testing framework with a single plain-language objective: "obtain shell access." Operating with minimal human intervention against university networks in East Asia, the agents mapped the API of an open-source medical imaging AI server—identified via the linked advisory as Project MONAI's MONAI Label (monailabel <= 0.8.5)—discovered an unknown path-traversal vulnerability in roughly 11 minutes, planted a malicious sitecustomize.py startup file, and spawned a new Python training process to gain a root reverse shell (NIST NVD CVE-2026-133968, GitHub Security Advisory GHSA-qc22-rmgc-vg94, Rescana Analysis, The Hacker News).

This technical deep dive cross-verifies the AWS Security Blog investigation report, GitHub Security Advisory GHSA-qc22-rmgc-vg94, the NIST NVD CVE-2026-133968 entry, Rescana's supply-chain and third-party risk briefing, and Debono's code-level comparison of MONAI Label tag 0.8.6 and PRs #1915/#1942 as of November 24, 2026. We did not execute live path-traversal payloads or run Cairn agents against target servers; all architectural analyses and hardening templates below are derived from official advisories and upstream repository diffs.

1. Three Critical Operational Boundaries Engineers Must Separate

Teams operating medical imaging pipelines, academic GPU clusters, or MLOps annotation servers frequently misjudge three boundaries when responding to CVE-2026-133968:

  1. "The Maintainers Merged a Fix on GitHub" vs. "pip install -U monailabel Installs a Patched Release": As of initial disclosure and verification, GHSA-qc22-rmgc-vg94 lists Affected versions: <= 0.8.5 and Patched versions: None. Although the maintainers merged the datastore path-confinement fix in PR #1915 on October 19, 2026 and pushed a 0.8.6 Git tag (PR #1942) on November 22, 2026, standard pip install monailabel and Docker Hub pulls pointing to 0.8.5 (published November 2024) still deliver the unpatched, vulnerable code (Rescana, Debono).
  1. "Enabling Authentication (MONAI_LABEL_AUTH_ENABLE=True)" vs. "Closing the Arbitrary File Write": By default, MONAI Label runs with authentication completely disabled (MONAI_LABEL_AUTH_ENABLE=False on default port 8000/tcp), exposing the flaw to any network-reachable client. However, GHSA-qc22-rmgc-vg94 explicitly notes that even when authentication is enabled, holding the standard ANNOTATOR role is sufficient to exploit the vulnerability.
  1. Supply-Chain .pth Package Poisoning vs. Network-Triggered sitecustomize.py Injection + /train Subprocess Spawning: Unlike malicious PyPI packages that execute .pth hooks at pip install time, the Cairn AI agents chained an unauthenticated HTTP path-traversal primitive to overwrite sitecustomize.py on disk and then invoked MONAI Label's model-training API endpoint to force the server to spawn a fresh Python child process, triggering automatic payload execution at interpreter startup (AWS Security Blog).

2. How Cairn's Autonomous Agents Found a Zero-Day in 11 Minutes and Chained It to Root RCE

2.1 Inside the Cairn Campaign: 16-Hour Autonomous Persistence vs. 11-Minute Zero-Day Discovery

On September 10, 2026, Amazon Threat Intelligence discovered an unauthenticated, internet-exposed Cairn server left open by a threat actor assessed with moderate confidence to be China-nexus (AWS Security Blog). The exposed operational logs revealed a 48-hour campaign (starting September 8, 2026) where multiple coordinated AI agents pursued the high-level goal "obtain shell access" across East Asian university networks without step-by-step human steering:

  • 16 Hours of Uninterrupted Adaptation Against Hardened Redis & Qdrant: Against an open Redis instance at one university, the agents executed 148 sequential actions over 16 continuous hours—attempting Redis replication module loading, Lua sandbox escapes, config file overwrites, memory corruption, and Log4Shell payloads against a co-located service. When those failed, the agents pivoted to a Server-Side Request Forgery (SSRF) flaw in a co-located Qdrant vector database to map the internal Docker network and spray credentials against PostgreSQL and SSH (AWS Security Blog).
  • Automated OSINT & 30,000+ Credential Spray Against a GPU Cluster: In a separate 6-hour operation against a university research GPU server, the agents scraped faculty directories, lab websites, archived pages, and published academic papers to compile ~80 real researcher usernames, testing over 30,000 credential combinations across SSH, admin dashboards, NAS devices, VPNs, and campus portals.
  • 11-Minute Black-Box Zero-Day Discovery on MONAI Label: When pointed at a university server running MONAI Label, the agents fingerprinted the web framework, enumerated its REST endpoints, spotted an upload endpoint taking a filename/identifier parameter, and probed it for directory traversal. In roughly 11 minutes from initial API mapping, the agents achieved arbitrary file write on the server—discovering what Amazon Threat Intelligence confirmed with high confidence was an undisclosed zero-day (AWS Security Blog).

2.2 Code-Level Root Cause in LocalDatastore.add_image() and save_label() (GHSA-qc22-rmgc-vg94)

As documented in GHSA-qc22-rmgc-vg94 and NIST NVD CVE-2026-133968 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, score 9.8, CWE-22 / CWE-24):

  1. PUT /datastore/image: Accepts a caller-controlled image query parameter and uses it directly as the image ID without sanitization. LocalDatastore.add_image() appends the file extension to this ID, joins it onto the datastore image directory path, and writes the uploaded file to disk via shutil.copy().
  1. PUT /datastore/label: LocalDatastore.save_label() constructs its destination path from the caller-supplied image ID and label tag in the same unvalidated manner.
  1. Missing Path Confinement: Because neither method resolved the destination path or verified that it remained inside the designated datastore root, passing traversal sequences (../../../tmp/x) allowed writing arbitrary file contents to any filesystem location writable by the MONAI Label server process.

2.3 From Arbitrary File Write to Root Shell: The sitecustomize.py + /train Subprocess Chain

In a subsequent session, the agents weaponized the arbitrary file write into full remote code execution without needing to restart the main MONAI Label server (AWS Security Blog, The Hacker News):

  1. Stage 1 (Planting sitecustomize.py): Whenever a Python interpreter process starts, its built-in site module automatically imports sitecustomize.py if present on sys.path (such as inside the environment's site-packages directory). The agents used the path-traversal flaw to write a Python reverse-shell payload directly to sitecustomize.py.
  1. Stage 2 (Triggering the Training Endpoint): Next, the agents sent a request to MONAI Label's model training API endpoint, which spawns a new Python child process to run the training job. Upon startup, the new Python process automatically imported the trojanized sitecustomize.py and opened a reverse shell running as root (because the university GPU server ran the MONAI Label daemon under the root account).
  1. Lateral Pivot to a Second University: After the agents discovered the zero-day, the human operator stepped in and handed the agents a proxy tunnel into a second university network whose entry server was also running MONAI Label, tasking the agents to pivot against internal hosts on that network (AWS Security Blog).

3. Supply-Chain Release Timeline & Patch Status Matrix (0.8.5 vs. PR #1915 / 0.8.6)

The table below synthesizes the exact state of MONAI Label across distribution channels and commits (GHSA-qc22-rmgc-vg94, Rescana, Debono):

Artifact / Commit / Tag
Security Status
Technical Scope & Code Changes
Operational Guidance
PyPI monailabel &lt;= 0.8.5
(Released Nov 25, 2024)
VULNERABLE
(CVSS 9.8 Critical)
No path confinement in LocalDatastore.add_image() or save_label(); authentication off by default (MONAI_LABEL_AUTH_ENABLE=False)
Do not rely on standard pip install monailabel while PyPI still serves 0.8.5 as the latest package
Docker Hub projectmonai/monailabel:0.8.5
VULNERABLE
(High Root RCE Risk)
Bundles unpatched 0.8.5 code; container deployments running as root allow immediate full-container takeover
Remove public port mappings (:8000) immediately and rebuild images from patched source commits
GitHub main PR #1915
(Commit 113527bf6, Oct 19, 2026)
Datastore Traversal Patched in Source
add_image() and save_label() resolve destination paths (including label tag directories) and reject paths outside the datastore; /datastore/image reduces image ID to its basename and rejects empty or dot-prefixed IDs with HTTP 400
Minimum source commit required to close CVE-2026-133968
GitHub README Security Warning
(PR #1940 / Commit af39c0c, Nov 19, 2026)
Official Deployment Policy Boundary
Maintainers added a top-level warning stating MONAI Label is not intended to be internet-facing, has "a number of known, unpatched security issues," and must only run on a closed, trusted LAN
Never expose MONAI Label—or any reverse proxy fronting it—to the public internet or untrusted campus networks
GitHub Tag 0.8.6
(Includes PR #1941 & #1942, Nov 22, 2026)
Datastore + Session Archive Extraction Patched
Includes PR #1915 + PR #1942 (confines session archive extraction against Zip Slip, blocks symlinks/special files, restricts session IDs to simple alphanumeric strings) + PR #1941 (resolves 49 Dependabot alerts and drops Python 3.10; requires Python 3.11+)
Verify your host/container runs Python 3.11 or newer before building from the 0.8.6 tag

4. Exposure Audit Script, IoC Hunting, and systemd Filesystem Confinement

4.1 One-Step Code Inspection & Compromise Hunting Script

Because package version numbers alone can mislead when source commits are installed directly, run the script below on every GPU server, container, and research workstation to inspect the live bytecode/source of LocalDatastore.add_image, check whether the daemon runs as root, hunt for rogue sitecustomize.py files, and check network logs against the two IPv4 indicators published by Amazon Threat Intelligence (142.4.98.145 and 142.4.107.34) (AWS Security Blog, Rescana):

4.2 Hardened systemd Unit with Read-Only Python site-packages Confinement

Even after deploying the patched source build (git+https://github.com/Project-MONAI/MONAILabel.git@0.8.6 on Python 3.11+), the maintainers' November 19 README warning explicitly notes that other unpatched vulnerabilities exist in the codebase. Enforce OS-level filesystem sandboxing via systemd (ProtectSystem=strict and ReadWritePaths) so that the MONAI Label process is physically incapable of writing to Python's site-packages, /etc/cron*, or ~/.ssh:

5. Operational Remediation & Defender Checklist

  • Step 1 (Eliminate Public & Untrusted Network Exposure Immediately): Have you removed all MONAI Label servers (default port 8000/tcp)—and any reverse proxies fronting them—from the public internet and shared campus/partner networks, confining them strictly to a closed, trusted LAN or VPN?
  • Step 2 (Verify Source-Level Patch Confinement & Python 3.11+ Readiness): Have you verified that LocalDatastore.add_image() and save_label() contain the path-resolution checks from PR #1915 / tag 0.8.6 (rather than relying on pip install monailabel, which may still pull unpatched 0.8.5), and upgraded the runtime environment to Python 3.11+?
  • Step 3 (Enforce Non-Root Execution & Read-Only Python Directories): Have you migrated MONAI Label off the root account, restricted the ANNOTATOR role to vetted internal users under MONAI_LABEL_AUTH_ENABLE=True, and mounted your Python site-packages directory read-only (ProtectSystem=strict)?
  • Step 4 (Forensic Hunt Back to September 2026 & Third-Party Supplier Audit): For any instance reachable from untrusted networks since September 2026, have you audited web logs for unrecognized PUT /datastore/image or PUT /datastore/label requests, inspected Python directories for unexpected sitecustomize.py or .pth files, checked firewall logs against 142.4.98.145 and 142.4.107.34, and queried external medical-imaging annotation partners/CROs?
  • Step 5 (Automate Containment Against Sub-15-Minute Agentic Kill Chains): As Amazon CISO CJ Moses emphasized, autonomous agents that go from API discovery to zero-day exploitation in 11 minutes outpace manual SOC alert queues—have you configured automated host isolation triggers when web or AI worker processes write .py files outside their data directories or spawn unexpected interactive shells?

References (Verified November 24, 2026)

Korean version: 자율형 AI 에이전트(Cairn)의 MONAI Label 제로데이(CVE-2026-133968) 11분 발굴 해부: sitecustomize.py 주입 RCE 체인과 PyPI 미패치 배포 공백·GPU 서버 격리 경계 점검하기자율형 AI 에이전트(Cairn)의 MONAI Label 제로데이(CVE-2026-133968) 11분 발굴 해부: sitecustomize.py 주입 RCE 체인과 PyPI 미패치 배포 공백·GPU 서버 격리 경계 점검하기

추천 글