How to Secure a MONAI Label Server After CVE-2026-133968
Security Intermediate 6 min read

How to Secure a MONAI Label Server After CVE-2026-133968

Upgrade to 0.8.6, turn on authentication, keep it off the internet and check for tampering: how to secure a MONAI Label server after CVE-2026-133968.

Published: November 24, 2026 • Updated: November 24, 2026
monai labelhardeningpath traversal

To secure a MONAI Label server you need four things, in this order: upgrade to 0.8.6, decide whether the host was ever reachable from an untrusted network and inspect it if so, turn authentication on, and move the service onto a closed network under an unprivileged account. CVE-2026-133968, the path traversal that AI agents exploited against university servers, works against every release through 0.8.5 with no credentials in the default configuration. This guide uses only steps documented by the MONAI Label project and Amazon's incident report.

Which MONAI Label versions are affected?

All versions up to and including 0.8.5 are vulnerable to CVE-2026-133968. Version 0.8.6, released on November 22, 2026, fixes it along with a second path traversal in session uploads.

Step 1: find every instance

MONAI Label is installed with pip or run from the projectmonai/monailabel Docker image, and the server listens on port 8000 unless MONAI_LABEL_SERVER_PORT says otherwise. It is a research tool, so instances rarely appear in central inventories. Researchers start it on their own GPU workstations next to 3D Slicer, OHIF, QuPath or CVAT, and some groups run it on shared lab servers for months.

Ask every imaging and AI group directly, check pip environments and Docker images on lab hosts, and scan research network ranges for HTTP services on port 8000. The viewer plugins store the server URL they connect to, which is another way to find servers nobody remembers starting. Treat any instance you find on an older version as exposed until you have checked it.

Step 2: upgrade to 0.8.6

The release notes give two commands:

pip install -U monailabel==0.8.6
docker pull projectmonai/monailabel:0.8.6

Read the release notes before upgrading an old environment. MONAI Label 0.8.6 drops Python 3.9 and 3.10 and requires 3.11 or newer. The Docker image is now based on Ubuntu 24.04 with Python 3.12, with python and monailabel provided from /opt/venv. The scribbles and GraphCut feature now needs an optional dependency installed with pip install monailabel[scribbles]. DICOM SEG export switched from pydicom-seg to highdicom and pydicom moved to 3.x, and the bundled OHIF plugin is now OHIF 3.11. Session uploads that are rejected, corrupt or unsupported return HTTP 400, and tar archives containing links or device files are refused. Test on one server, confirm your viewer plugins still connect, then roll out.

Step 3: check for tampering before you trust the host

The release notes are explicit: if a 0.8.5 or older server was reachable from an untrusted network, review it for unexpected file changes before returning it to service. Upgrading removes the bug, not whatever was written through it.

Amazon's report describes what the attackers did with the write. They placed a Python reverse shell in sitecustomize.py, a file the interpreter imports at startup, then called a training API endpoint so the server spawned a new Python process that loaded it. The advisory lists other routes an arbitrary write enables: overwriting application code, adding SSH authorized keys and adding cron entries. Check all of them:

  • Python startup files in every site-packages directory the server's interpreter uses, and any .pth files you did not install.
  • Files outside the datastore directories that were modified while the server was exposed, especially anything owned by the service account.
  • SSH authorized_keys for the service account and for root, and all cron locations.
  • The installed monailabel package compared against a fresh install of the same version.
  • Outbound connections. A reverse shell is an outbound session from a server that should only talk to viewers and a PACS. Amazon's indicators for September 8 to 10 are 142.4.98.145 and 142.4.107.34.
  • Access logs for PUT requests to /datastore/image or /datastore/label with traversal sequences in the image parameter, PUT /session/ uploads from unknown clients, and training calls from the same client shortly after.

If any check finds something, treat the host as a root compromise. Rebuild it from a clean image rather than cleaning it, and rotate every secret the server held: datastore username, password and API key, DICOMweb credentials, the model zoo token and any tracking URI credentials in its settings. Then review what the server could reach, starting with the PACS.

How do you enable authentication in MONAI Label?

Set MONAI_LABEL_AUTH_ENABLE to True, point MONAI_LABEL_AUTH_REALM_URI at your identity provider realm and set MONAI_LABEL_AUTH_CLIENT_ID to the client you registered there. Then assign users to the monailabel-admin, monailabel-reviewer, monailabel-annotator and monailabel-user roles.

The settings module reads these from environment variables or a .env file. The default realm URI is a placeholder on localhost port 8080, so a working setup needs an external identity provider that issues tokens carrying the username, email, name and roles claims the settings name. The exact identity provider configuration lives in the MONAI Label documentation and is not reproduced here; follow the project's current instructions for your provider.

Two cautions. First, the advisory says the ANNOTATOR role was sufficient to exploit the traversal on 0.8.5, so authentication alone did not mitigate this bug. It is defence in depth after the upgrade, not a substitute for it. Second, do not grant the annotator role to anyone you would not trust with write access to the server's filesystem. Shared annotator accounts for visiting researchers are common and should end.

Should a MONAI Label server ever be internet-facing?

No. The project's README states that MONAI Label is not intended to run as an internet-facing application, that known unpatched issues make it fragile on untrusted networks, and that it should be deployed only on a closed, trusted LAN with no public proxy in front of it.

In practice that means a research VLAN reachable only from annotator workstations and the PACS, no port forwarding, and a VPN for remote collaborators rather than a temporary exposure. The CORS origins setting defaults to an empty list; leave it that way unless a browser based viewer on another origin needs it, and then list that origin only. If your institution already runs a self-hosted AI inference server behind a reverse proxy, the same network placement rules apply here.

Step 6: run it as an unprivileged user

The advisory recommends running the server as an unprivileged user with write access limited to the datastore directory. In Amazon's case the server ran as root, which is why the agents' reverse shell ran as root. With the recommended account, the same traversal could still have corrupted the datastore but could not have reached system startup files, cron or root's SSH keys. If you deploy with Docker, the same argument against root containers applies; set a non-root user and mount only the datastore as writable.

Keep watching the project

Subscribe to security advisories and releases for the Project-MONAI/MONAILabel repository. The fix for this bug sat in a merged pull request for weeks before the advisory and release; a lab that watches the repository could have patched before CISA's deadline existed. The README's own wording suggests further fixes are coming. Autonomous attack tools now map APIs and test parameters without human effort, so understanding how Cairn agents find endpoints like these is part of the job for anyone who runs research software on a network.