Tag: Python

Detecting MONAI Label CVE-2026-133968: 5 Sigma rules for web, host and network

Detecting MONAI Label CVE-2026-133968: 5 Sigma rules for web, host and network

First written November 21, 2026. Updated December 3, 2026: the flaw is now CVE-2026-133968 (CVSS 9.8), fixed in MONAI Label 0.8.6 and in CISA KEV, and Previdian has published indicators from a second operation against it.

Amazon’s write-up advises defenders to build high-confidence detections that can trigger an automated response, with humans overseeing outcomes. That sounds abstract until you try it. MONAI Label is a niche Python application, and when I first wrote this I found no public detections for it. So I wrote some.

The bug, the release history and the AI agent angle are in my analysis. This post is the defender’s half: five Sigma rules, the telemetry each one needs, how to tune them and how to test them safely.

At a glance

  • Vulnerability: CVE-2026-133968 (GHSA-qc22-rmgc-vg94), CVSS 9.8, MONAI Label before 0.8.6. In CISA KEV since November 23, 2026.
  • Rules: 5. Three are status: test (built on behaviour or indicators from the advisory or Amazon), two are status: experimental (my inference).
  • Log sources: HTTP access logs from MONAI Label (opt-in with --access_log) or a reverse proxy; Linux file and process events (Sysmon for Linux, auditd or an EDR); firewall logs. Only the web rule needs the access log.
  • ATT&CK (my mapping): T1190, T1546.018, T1059.004, T1098.004, T1053.003. The IP rule has none.
  • New since November 21: Previdian’s indicators for an ARTEX-linked operation are in my ARTEX detection post, not repeated here.
  • YAML: my Detection Rules repo on GitHub.

The case in brief

According to the advisory, PUT /datastore/image uses the caller’s image query parameter as the image ID without validation and copies the upload to that path. PUT /datastore/label builds its path from the image ID and the label tag the same way, and in 0.8.5 the deprecated PUT /datastore/ route calls the image handler. Authentication is off by default, so the result is an arbitrary file write as whatever user runs the server.

Amazon describes what the attacker did with the bug in the medical imaging application it doesn’t name (the CVE record and advisory identify it as MONAI Label): a Python reverse shell written to sitecustomize.py, then a training call that made the server start a fresh Python process, which imported the hook and connected back as root. MONAI Label 0.8.5 runs those tasks as python -m monailabel.interfaces.utils.app. That gives four places to look: the HTTP request, the file on disk, the processes that follow, and the network.

Detection map

Detection map: an opt-in HTTP access log, Linux file events, Linux process creation and firewall logs feed five Sigma rules; four are mapped to T1190, T1546.018, T1059.004, T1098.004 and T1053.003, the IP rule has no technique, and .pth hooks, pure-Python shells and the C2 pivot are marked as gaps.
Which telemetry feeds which rule, and what none of them can see. Only the web rule needs MONAI Label’s opt-in access log. ATT&CK mapping is mine.

The top source is the weak spot: the access log is off unless someone started the server with --access_log, and in my experience many lab installs don’t sit behind a proxy. The host sources are stronger, but only if the GPU box runs Sysmon for Linux, auditd or an EDR. The dashed box is what none of the rules see: .pth startup hooks, a reverse shell that never starts a shell binary, the C2 channel and the proxy pivot.

Rule overview

RuleDomainLog sourceATT&CK (my mapping)LevelStatus
Datastore upload with path traversal in image or tag parameterWeb/Appwebserver (opt-in access log or proxy)Initial Access / T1190HighTest
Python startup hook sitecustomize or usercustomize createdLinuxlinux / file_eventPersistence, Privilege Escalation / T1546.018HighTest
Shell or network tool spawned by MONAI Label server or task processLinuxlinux / process_creationExecution / T1059.004HighExperimental
Python interpreter writes SSH authorized keys or cron filesLinuxlinux / file_eventPersistence / T1098.004, T1053.003MediumExperimental
Traffic with IP addresses from Amazon’s Cairn reportNetworkfirewallNone (role not stated)MediumTest

The rules

Datastore upload with path traversal in the image or tag parameter

Context. The exploit request itself, the earliest point you can catch the attack. It needs HTTP request logs with the query string: the --access_log flag or a reverse proxy logging in front of the server.

Condition. Alert on a PUT to a path ending in /datastore/, /datastore/image or /datastore/label where the image or tag parameter contains .., a slash, a backslash, or their URL-encoded (or double-encoded) forms. Endpoints, parameters and bug class come from the advisory and the CVE record; the character set is my inference. endswith keeps it working behind a path prefix.

ATT&CK. Initial Access (TA0001), T1190 Exploit Public-Facing Application.

title: MONAI Label Datastore Upload With Path Traversal In Image Or Tag Parameter
id: 580a8863-e255-42ca-a57b-f3735ae7f382
status: test
description: |
    Detects PUT requests to the MONAI Label datastore upload routes where the image or tag query
    parameter contains a dot-dot sequence, a slash, a backslash or their URL-encoded forms.
    CVE-2026-133968 (GHSA-qc22-rmgc-vg94, fixed in 0.8.6) lets these parameters write files outside
    the datastore. Needs HTTP access logs, which MONAI Label only writes with --access_log, or the logs
    of a reverse proxy in front of it.
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2026-133968
    - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
    - https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
modified: 2026-12-01
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2026-133968
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection_method:
        cs-method: 'PUT'
    selection_uri:
        cs-uri-stem|endswith:
            - '/datastore/'
            - '/datastore/image'
            - '/datastore/label'
    selection_param:
        cs-uri-query|re: '(?i)(^|&)(image|tag)=[^&]*(\.\.|/|\\|%2f|%5c|%2e%2e|%252f|%255c)'
    condition: all of selection_*
falsepositives:
    - Authorised vulnerability scanning or penetration tests against the MONAI Label server
    - Custom clients that send image IDs containing folder separators; confirm with the data owners and filter on their source addresses
level: high

View on GitHub

False positives and tuning. Legitimate image IDs are plain names, so the main noise is your own scanners and pentests; filter their source addresses. Uvicorn’s access log is one line per request, so you need a parser that splits it into cs-method, cs-uri-stem and cs-uri-query. SigmaHQ’s generic “Path Traversal Exploitation Attempts” rule probably won’t catch this: it looks for traversal towards /etc/ and Windows folders, not a write into site-packages.

How to test. Replay a synthetic log line such as PUT /datastore/image?image=..%2Ftest through your parser and SIEM. For a live request, use a lab instance on 0.8.6 or later, where the fix reduces the ID to its base name so the upload stays inside the datastore and the request is still logged. Never test against hosts you don’t own.

Python startup hook sitecustomize or usercustomize created

Context. The step Amazon observed: the reverse shell written to sitecustomize.py, which Python imports at every interpreter start. It needs no access log and doesn’t care how the file got there. Elastic ships the same idea as “Python Site or User Customize File Creation”; this is my own Sigma version.

Condition. Alert when any process creates or overwrites a file ending in /sitecustomize.py or /usercustomize.py, unless the writer is a system or conda package manager. File events don’t carry the writer’s command line, so the rule stays generic.

ATT&CK. Persistence (TA0003), Privilege Escalation (TA0004), T1546.018 Event Triggered Execution: Python Startup Hooks.

title: Python Startup Hook Sitecustomize Or Usercustomize Created On Linux
id: c473ee4e-df72-4d6d-8b73-d4604dcacadc
status: test
description: |
    Detects creation or overwrite of sitecustomize.py or usercustomize.py, which Python imports
    automatically at interpreter startup. Amazon reports the actor wrote a Python reverse shell to
    sitecustomize.py through the file-write bug, then made the server start a new Python process
    to run it. In my experience such a file is uncommon, so a new one is worth a look on any host.
references:
    - https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/
    - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
    - https://nvd.nist.gov/vuln/detail/CVE-2026-133968
    - https://docs.python.org/3/library/site.html
    - https://attack.mitre.org/techniques/T1546/018/
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
modified: 2026-12-01
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1546.018
logsource:
    product: linux
    category: file_event
detection:
    selection:
        TargetFilename|endswith:
            - '/sitecustomize.py'
            - '/usercustomize.py'
    filter_main_package_managers:
        Image|endswith:
            - '/dpkg'
            - '/apt'
            - '/apt-get'
            - '/rpm'
            - '/dnf'
            - '/yum'
            - '/zypper'
            - '/conda'
            - '/mamba'
            - '/micromamba'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Distribution packages that may ship a sitecustomize.py with the system Python, when written by a tool not in the filter list
    - pip or Poetry installing a package that provides sitecustomize.py; pip runs as the python interpreter, so it cannot be filtered on Image. Baseline per host
    - Coverage and profiling tools that may drop a sitecustomize.py on CI runners
level: high

View on GitHub

False positives and tuning. pip and Poetry run as the Python interpreter, so a package that installs a sitecustomize.py will fire; coverage and profiling tools on CI runners may too. Baseline per host for a week, then filter specific paths, not the interpreter.

How to test (my suggestion, not from a source). In a throwaway container, create an empty sitecustomize.py in the directory printed by python3 -c 'import site; print(site.getsitepackages()[0])', confirm the alert, then delete the file.

Shell or network tool spawned by the MONAI Label server or its task process

Context. Amazon reports the training call started the Python process that ran the planted shell, as root. Commands an operator types into that shell run as children of a MONAI Label process.

Condition. Alert when sh, bash, dash, zsh, nc, ncat, socat, curl or wget starts with a parent command line containing monailabel. That covers monailabel start_server and the task processes. The attack’s process tree isn’t published, so this is inference.

ATT&CK. Execution (TA0002), T1059.004 Command and Scripting Interpreter: Unix Shell.

title: Shell Or Network Tool Spawned By MONAI Label Server Or Its Task Process
id: d571b32e-2a17-4ac5-bded-ee3d5628170b
status: experimental
description: |
    Detects a Unix shell or network utility whose parent command line contains monailabel, which
    covers the server and the Python processes it starts for training and other tasks. Amazon reports
    that a training API call started the Python process that ran the planted reverse shell, giving
    the actor a root shell. Inferred logic: the exact process tree is not published.
references:
    - https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/
    - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
    - https://nvd.nist.gov/vuln/detail/CVE-2026-133968
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
modified: 2026-12-01
tags:
    - attack.execution
    - attack.t1059.004
    - cve.2026-133968
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection_parent:
        ParentCommandLine|contains: 'monailabel'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/zsh'
            - '/nc'
            - '/ncat'
            - '/socat'
            - '/curl'
            - '/wget'
    condition: all of selection_*
falsepositives:
    - Custom MONAI Label apps or training scripts that shell out, for example to download models or call system tools; baseline child command lines per app before alerting
level: high

View on GitHub

False positives and tuning. Custom apps can shell out during training; baseline child command lines per app. A pure-Python reverse shell stays invisible here until the operator runs a command, which is why the startup hook rule matters more. To test, make a lab app’s training hook run /bin/sh -c true, then remove it.

Python interpreter writes SSH authorized keys or cron files

Context. The advisory lists SSH keys and cron as routes from this file write to code execution. Amazon doesn’t report them being used, but the next actor might, and the writes would presumably come from python.

Condition. Alert when an image path containing /python writes authorized_keys or authorized_keys2 under .ssh, a file under /etc/cron.d/, /etc/cron.hourly/, /etc/cron.daily/ or /var/spool/cron/, or /etc/crontab. Inferred, hence experimental and medium.

ATT&CK. Persistence (TA0003), T1098.004 SSH Authorized Keys; T1053.003 Cron.

title: Python Interpreter Writes SSH Authorized Keys Or Cron Files On Linux
id: e2d226bb-db95-4365-b269-2f022ee1c6e0
status: experimental
description: |
    Detects a Python interpreter creating or modifying authorized_keys or cron files. The MONAI Label
    advisory GHSA-qc22-rmgc-vg94 names SSH keys and cron as routes from its arbitrary file write to
    code execution, and the server is a Python process, so that write would presumably come from python.
    Inferred from the advisory; Amazon only describes the sitecustomize.py route.
references:
    - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
tags:
    - attack.persistence
    - attack.t1098.004
    - attack.t1053.003
logsource:
    product: linux
    category: file_event
detection:
    selection_image:
        Image|contains: '/python'
    selection_target_keys:
        TargetFilename|endswith:
            - '/.ssh/authorized_keys'
            - '/.ssh/authorized_keys2'
    selection_target_cron:
        TargetFilename|startswith:
            - '/etc/cron.d/'
            - '/etc/cron.hourly/'
            - '/etc/cron.daily/'
            - '/var/spool/cron/'
    selection_target_crontab:
        TargetFilename: '/etc/crontab'
    condition: selection_image and 1 of selection_target_*
falsepositives:
    - Configuration management written in Python (Ansible modules, Salt) that manages SSH keys or cron entries; filter on the service account or parent
    - cloud-init writing authorized_keys on first boot
level: medium

View on GitHub

False positives and tuning. Ansible, Salt and cloud-init are written in Python and manage exactly these files; filter by service account or parent. On a lab GPU box with no configuration management, any hit deserves a look.

Traffic with the IP addresses from Amazon’s Cairn report

Context. Amazon lists 142[.]4.98.145 and 142[.]4.107.34 as seen in records dated September 8 to 10, 2026, without saying what role they played. Treat them as retro-hunt leads. Previdian’s indicators from the November ARTEX-linked operation are a different set; they are in the ARTEX detection post.

Condition. Any firewall record with either address as source or destination. The YAML holds the real addresses, because a rule can’t match defanged ones. ATT&CK: none; without a stated role, any technique would be invented.

title: Traffic With IP Addresses From Amazon Cairn Campaign Report
id: 07f34ede-b119-4c8a-b18c-eeb09da4ca74
status: test
description: |
    Detects traffic to or from the two IP addresses Amazon Threat Intelligence says appear in records
    dated September 8 to 10, 2026, in its report on the Cairn AI agent campaign that exploited a
    medical imaging application. Amazon does not state the role of the addresses, so treat a match
    as a lead for a retro-hunt, not proof of compromise.
references:
    - https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
tags:
    - detection.emerging-threats
logsource:
    category: firewall
detection:
    selection_dst:
        dst_ip:
            - '142.4.98.145'
            - '142.4.107.34'
    selection_src:
        src_ip:
            - '142.4.98.145'
            - '142.4.107.34'
    condition: 1 of selection_*
falsepositives:
    - Infrastructure reuse; the addresses may have been reassigned since September 2026
level: medium

View on GitHub

Tuning. Addresses get reassigned. Run it against logs from September 1, 2026 onwards and retire it after about three months. Test by replaying a log line; don’t generate real traffic to them.

Coverage and gaps

Step in the caseTacticTechnique (my mapping)RuleCovered?
Agents map the APIReconnaissanceT1595–Gap: needs access logs and a baseline
Traversal uploadInitial AccessT1190Datastore upload traversalYes, if access log or proxy
sitecustomize.py writtenPersistenceT1546.018Startup hook createdYes, with file telemetry
.pth startup hook (alternative)PersistenceT1546.018–Gap: too noisy here
authorized_keys or cron (alternative)PersistenceT1098.004, T1053.003Python writes keys or cronYes (inferred)
Train call runs the payloadExecutionT1059.004Shell under MONAI LabelPartial
Reverse shell and proxy pivotCommand and Control–IP rule (role of IPs unknown)Gap

The gap that worries me most is a reverse shell written entirely in Python, talking out over an ordinary port: it never starts a shell binary and never touches a file after the hook. If the hook is a .pth file instead, the startup hook rule misses it too; Elastic’s “Python Path File (pth) Creation” rule is a starting point if you can make it quiet. File integrity monitoring on site-packages and egress rules on GPU boxes close most of the rest.

Deploying the rules

Download the YAML from the repo and convert it with sigma-cli for your SIEM. The lines below are untested (I haven’t run them against these files); they convert without a processing pipeline, so pick one that matches your log schema, or map the field names (TargetFilename, ParentCommandLine, cs-uri-query, dst_ip) yourself.

sigma convert -t splunk --without-pipeline web_monai_label_datastore_upload_path_traversal.yml
sigma convert -t lucene --without-pipeline file_event_lnx_python_sitecustomize_usercustomize_creation.yml
sigma convert -t kusto --without-pipeline proc_creation_lnx_monai_label_shell_or_network_tool_child.yml

The web rule uses a regular expression; check that your backend supports |re. Run everything in alert-only mode for a week, and look at what the startup hook rule finds on your build servers first.

My take

This case is more detectable than it looks, but not with the telemetry most MONAI Label installs have. The exploit request is a single, very distinctive HTTP call, and the default server doesn’t log it. The payload step is even more distinctive, but in my experience lab GPU boxes rarely record file writes.

Patching to 0.8.6 or later (I’d take 0.8.8) closes the bug, not an earlier compromise. If you can only do one more thing, turn on the startup hook rule: it catches the technique Amazon saw, works for every Python service you run, and a new sitecustomize.py is rare enough that an alert should reach a person quickly. Then add --access_log or a proxy, because two agent frameworks have now come for this server and the next one will too.

Sources

MONAI Label CVE-2026-133968: the zero-day behind Amazon’s Cairn AI agent report

MONAI Label CVE-2026-133968: the zero-day behind Amazon’s Cairn AI agent report

First written November 21, 2026. Updated December 3, 2026: the flaw now has a CVE (CVE-2026-133968, CVSS 9.8), a fixed release (0.8.6), a CISA KEV entry and a second, unrelated exploitation report. See “Update, December 3” below.

About eleven minutes. That is how long Amazon says it took a set of AI agents, given a list of IP addresses and the goal “obtain shell access”, to go from mapping an unfamiliar medical imaging server’s API to writing arbitrary files on it. Amazon is highly confident nobody had found the bug before.

Amazon Threat Intelligence published the story on November 20, 2026, after it found a publicly hosted, unauthenticated instance of the attacker’s agent framework, Cairn. Amazon doesn’t name the software. The CVE record and the maintainers do: it is MONAI Label, an open-source tool for annotating medical images and training segmentation models, and the bug is a path traversal in its datastore upload endpoint, CVE-2026-133968 (GitHub advisory GHSA-qc22-rmgc-vg94).

Severity: critical. CVSS 9.8, no authentication needed in the default configuration, exploited in the wild since September 2026, and in CISA’s Known Exploited Vulnerabilities catalog since November 23. Version 0.8.6 fixes it.

At a glance

  • CVE: CVE-2026-133968, published November 20, 2026. Same flaw as GitHub advisory GHSA-qc22-rmgc-vg94 (November 18), per the maintainers’ 0.8.6 release notes. CWE-24 / CWE-22.
  • CVSS: 9.8 (3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), assigned by MITRE as CNA.
  • Affected: monailabel (pip) before 0.8.6. Endpoints PUT /datastore/image and PUT /datastore/label.
  • Auth needed: none by default. With auth on, the ANNOTATOR role is enough.
  • Exploitation: Amazon reports a zero-day exploited during a Cairn campaign that began September 8, 2026 and ran about 48 hours; it doesn’t date the exploit session itself. Previdian reports a separate operation against its honeypot on November 26. In CISA KEV since November 23.
  • Patch: 0.8.6, released November 22, 2026. I’d go to 0.8.8 (November 25), which also fixes later critical bugs.
  • Who should care: anyone running MONAI Label or university GPU and ML lab infrastructure.

Update, December 3: a CVE, a release and a second operation

MITRE published CVE-2026-133968 on November 20 (I missed it in my first version), describing a traversal through the image parameter of PUT /datastore/image, “as exploited in the wild starting in September 2026”. The maintainers shipped 0.8.6 on November 22 and their release notes list the CVE and GHSA-qc22-rmgc-vg94 as one issue, so my earlier “likely MONAI Label” hedge is gone. CISA added the CVE to KEV on November 23.

Then on November 26, Previdian’s MONAI Label honeypot in Germany took 454 HTTP requests from one IP over nearly four hours and ended with root-level Python code execution inside the honeypot container. Previdian links the operation to ARTEX, another agentic offensive framework, with moderate confidence, and says it has not established any connection to the operators in Amazon’s report. I cover that operation, its indicators and the rules for it in my ARTEX analysis and its detection post.

One more thing: 0.8.7 and 0.8.8, both released November 25, fix further critical remote code execution bugs, one of them reachable through training task requests (/train).

What we know

On September 10, 2026, Amazon found a server hosting Cairn, an open-source framework that coordinates multiple AI agents, running without authentication, so the operator’s prompts and the agents’ output were readable. Citing Simplified Chinese prompts and China Standard Time timestamps, Amazon attributes the activity to a Chinese-nexus actor at moderate confidence.

The campaign began September 8 and lasted roughly 48 hours, aimed at universities in East Asia outside mainland China. Most of it failed: about 16 hours and 148 actions against an unauthenticated Redis server, and more than 30,000 credential combinations against a GPU server, got nowhere.

The medical imaging server was different. Amazon writes that the agents identified the framework, mapped its API, found an upload endpoint with a filename-style parameter, tested it for path traversal and got arbitrary file write in about 11 minutes. In a later session they used the bug to drop a Python reverse shell into sitecustomize.py, then hit a training API endpoint to spawn a fresh Python process. The shell came back as root.

Then a human handed the agents a proxy into a second university network, whose server ran the same software; Amazon infers the actor had used the zero-day to compromise it.

Amazon’s post still says only “an open-source medical imaging AI application”. The name comes from the advisory, first reported by aws-sec-vdp (which appears to be Amazon’s disclosure program), and from the CVE record, whose NVD entry cites Amazon’s post.

How it works

The root cause is about as old as web servers. PUT /datastore/image takes an image query parameter and uses it, unvalidated, as the image ID. LocalDatastore.add_image() appends an extension, joins the ID onto the datastore’s image directory and copies the uploaded bytes there. Nothing checks that the result is still inside the datastore, so ../ sequences walk out of it. save_label(), behind PUT /datastore/label, builds its destination from the image ID and the label tag the same way.

The advisory lists the usual routes from file write to code execution (application code, SSH keys, cron). The agents picked a quieter one. Python’s site module imports a module called sitecustomize at interpreter startup, before any user code runs. Drop that file on the interpreter’s search path and every new Python process runs it. MONAI Label starts new Python processes when you ask it to train a model, so one API call turns a written file into a running payload.

Four-step attack chain for CVE-2026-133968 as Amazon describes it: agents map the application's API, abuse the datastore upload path traversal, plant a reverse shell in sitecustomize.py, then trigger training to get a root shell and pivot.
How the Cairn agents went from API mapping to a root shell, per Amazon Threat Intelligence. Amazon doesn’t name the app; the CVE record and advisory do.

The defaults make exposure easy: in the source I checked (0.8.5 and main), authentication is off unless you set MONAI_LABEL_AUTH_ENABLE, and monailabel start_server binds to 0.0.0.0 on port 8000. A process running as root can write anywhere. Run as a user limited to the datastore, the same bug is far less useful.

The fix in PR #1915 resolves each destination with realpath, refuses writes outside the datastore and keeps only the basename of a supplied ID.

From fix to release

PR #1915 was merged into main on October 19. The advisory went public on November 18 saying the fix “will be included in the next MONAI Label release”, and on November 21 PyPI still offered only 0.8.5 from November 2024. Version 0.8.6 reached PyPI on November 22, a month after the merge. It requires Python 3.11 or newer, so older lab environments may need a rebuild.

Timeline from the September 8, 2026 campaign start through the October 19 fix, the November 18 advisory, the November 20 CVE, the November 22 0.8.6 release, the November 23 CISA KEV entry and Previdian's November 26 honeypot exploitation.
Campaign, fix, disclosure and release dates, plus the exploitation Previdian saw after disclosure.

Who is affected and how badly

The install base is small, mostly research labs, and I have no source for how many instances face the internet. But its users rarely have a security team watching: a researcher spins it up on a lab GPU box, leaves the defaults and gets back to work.

Those boxes hold imaging datasets (possibly patient data), model weights and often storage credentials, and Amazon’s account shows a compromised one used as a tunnel into a university network. The annotation server is a door, not the prize. And two agent frameworks, Cairn per Amazon and ARTEX per Previdian (moderate confidence), have now gone after this one product within three months.

What to do now

  1. Find your instances: monailabel processes and port 8000 listeners on lab and GPU hosts. Ask research groups directly.
  2. Upgrade to 0.8.6 or later. I’d go straight to 0.8.8: 0.8.7 and 0.8.8 fix further critical RCE bugs, including a client-supplied bundle_path on task requests such as /train (GHSA-j5c7-p3x5-gw2x).
  3. Take servers off untrusted networks: bind to an internal address, or put them behind a VPN or authenticating reverse proxy.
  4. Turn on authentication with MONAI_LABEL_AUTH_ENABLE=True (it needs an identity provider realm in MONAI_LABEL_AUTH_REALM_URI), and give the ANNOTATOR role only to people you trust.
  5. Stop running it as root; use an account that can write only to the datastore.
  6. Check whether you were already hit. The 0.8.6 release notes ask anyone whose 0.8.5 or older server was reachable from an untrusted network to review it for unexpected file changes first.

Detection and monitoring

You can catch this at three points: the traversal request, the startup hook landing on disk, and the shell after the training call. MONAI Label’s access log is opt-in (--access_log), so the web rule needs that flag or a reverse proxy. The host rules need Linux file and process telemetry, which in my experience lab GPU boxes rarely have. The ATT&CK IDs are my mapping, not the sources’.

RuleCategoryLog sourceATT&CKLevel
Datastore upload with traversal in image or tag (needs access log or proxy)Web/AppwebserverT1190High
sitecustomize.py or usercustomize.py createdLinuxlinux / file_eventT1546.018High
Shell or network tool spawned by MONAI Label processesLinuxlinux / process_creationT1059.004High
Python writes authorized_keys or cron filesLinuxlinux / file_eventT1098.004, T1053.003Medium
Traffic with the IPs seen in Amazon’s recordsNetworkfirewallnone (role unknown)Medium

I’d turn on the startup hook rule first, because it covers the step Amazon saw and doesn’t care how the file got there. Python imports sitecustomize.py at every interpreter start, and in my experience few hosts have one, so the rule alerts on any process creating or overwriting a file of that name, minus system package managers. It isn’t MONAI-specific, which is a feature.

title: Python Startup Hook Sitecustomize Or Usercustomize Created On Linux
id: c473ee4e-df72-4d6d-8b73-d4604dcacadc
status: test
description: |
    Detects creation or overwrite of sitecustomize.py or usercustomize.py, which Python imports
    automatically at interpreter startup. Amazon reports the actor wrote a Python reverse shell to
    sitecustomize.py through the file-write bug, then made the server start a new Python process
    to run it. In my experience such a file is uncommon, so a new one is worth a look on any host.
references:
    - https://aws.amazon.com/blogs/security/chinese-nexus-actors-cairn-ai-agents-found-a-zero-day-on-their-own/
    - https://github.com/Project-MONAI/MONAILabel/security/advisories/GHSA-qc22-rmgc-vg94
    - https://nvd.nist.gov/vuln/detail/CVE-2026-133968
    - https://docs.python.org/3/library/site.html
    - https://attack.mitre.org/techniques/T1546/018/
    - https://netsec101.com/?p=382
author: netsec101.com
date: 2026-11-21
modified: 2026-12-01
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1546.018
logsource:
    product: linux
    category: file_event
detection:
    selection:
        TargetFilename|endswith:
            - '/sitecustomize.py'
            - '/usercustomize.py'
    filter_main_package_managers:
        Image|endswith:
            - '/dpkg'
            - '/apt'
            - '/apt-get'
            - '/rpm'
            - '/dnf'
            - '/yum'
            - '/zypper'
            - '/conda'
            - '/mamba'
            - '/micromamba'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Distribution packages that may ship a sitecustomize.py with the system Python, when written by a tool not in the filter list
    - pip or Poetry installing a package that provides sitecustomize.py; pip runs as the python interpreter, so it cannot be filtered on Image. Baseline per host
    - Coverage and profiling tools that may drop a sitecustomize.py on CI runners
level: high

Retro-hunt from September 1, 2026 on every MONAI Label host for sitecustomize.py, usercustomize.py or new .pth files, and changes to authorized_keys and crontabs. Amazon lists two IPs, 142[.]4.98.145 and 142[.]4.107.34, in records dated September 8 to 10, without saying what role they played; a hit is a lead, and I’d stop alerting on them after a few months.

I wrote up all five rules, with tuning notes and ATT&CK coverage, in a separate detection post. The YAML lives in my Detection Rules repo.

My take

The bug is boring: a user-supplied ID joined onto a directory without checking where it lands. What isn’t boring is who found it: an open-source agent framework, in about 11 minutes, while the operator’s job was writing a target list.

The “AI hacker” framing undersells the useful lesson, which is where these agents win. Redis and the password spraying got them nothing; obscure software with authentication off by default got them root. Previdian’s honeypot shows the same product drawing a second framework days after the CVE landed. Agents are good at grinding through the long tail of software human attackers never bothered with, and research infrastructure is that long tail.

So my priority list isn’t “deploy AI defence”. It is: find the lab servers, upgrade to 0.8.8, take them off the internet, turn auth on, stop running them as root. The maintainers have since shipped three security releases in four days. The month between merge and release is what I’d want fixed next time.

Sources