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

Leave a Reply