Cairn found a 0-day in MONAI Label and wrote files in 11 minutes

Cairn found a 0-day in MONAI Label and wrote files in 11 minutes

Cairn’s AI agents went from mapping a medical imaging application to writing arbitrary files on its server in about 11 minutes, according to Amazon Threat Intelligence. The company says the flaw, a path traversal vulnerability in MONAI Label, had no patch or prior advisory when it was discovered; attackers later used it to obtain a root shell.

The sequence described by Amazon was not a tool suggesting a vulnerability to an analyst. The operator gave Cairn a list of IP addresses and a goal in natural language—“obtain shell access”—and the agents planned, carried out, and adjusted their actions without a person choosing each step. Human oversight did not disappear entirely: later, the operator intervened to direct the attack toward another network.

flowchart TD
A["Operador: objetivos y meta"] --> B["Agentes de Cairn: reconocimiento"]
B --> C["Pruebas de la aplicación"]
C --> D["Recorrido de rutas en MONAI Label"]
D --> E["Escritura arbitraria de archivos"]
E --> F["Carga de reverse shell"]
F --> G["Shell como root"]
G --> H["Operador: proxy a otra red"]

A flaw in the upload path

The successfully targeted system was running MONAI Label, an open-source application for working with medical images. The security advisory published on GitHub describes the issue in the data store’s upload endpoints: the server accepted an image identifier controlled by the requester and used it to construct the file path without checking that the destination remained inside the intended directory.

With a manipulated path value, uploaded content could be written to arbitrary locations accessible to the MONAI Label process. The advisory notes that this write access could be used to execute code—for example, by modifying application files—or cause a denial of service by overwriting configurations. Amazon says the agents located the upload endpoint, tested the filename parameter, and achieved arbitrary file writing after mapping the API.

The exploitation did not end with that write. In a later session, the agents placed a reverse shell payload in sitecustomize.py, a file that Python imports when the interpreter starts. They then triggered a training endpoint that spawned another Python process; that process loaded the payload and opened a shell with root privileges. The chain thus turned a vulnerable upload parameter into full control of the server described by Amazon.

What was automated and where a person intervened

Amazon found the Cairn instance on September 10, 2026, publicly exposed and unauthenticated. Its history exposed configurations, instructions, and AI responses. The campaign under investigation had begun on September 8 and targeted IP addresses associated with universities in East Asia outside mainland China for about 48 hours.

According to Amazon, the instructions were in Simplified Chinese, and the scripts’ timestamps followed China Standard Time. Based on these details and the target selection, Amazon Threat Intelligence attributed the activity, with moderate confidence, to a Chinese-nexus actor. This is the company’s assessment, not a conclusive identification of the operator.

The level of autonomy was not identical across all phases. In the operation against MONAI Label, the agents found and exploited the flaw without the operator selecting each action. In another session, after the discovery, the actor provided them with a proxy to a second university network running the same software and instructed them to attack other machines. Amazon infers that the operator had used the vulnerability to compromise the proxy server and establish the tunnel.

Cairn describes itself as an open-source autonomous penetration testing framework designed for research and defense. According to AWS, it works by coordinating several agents from a starting point and a goal expressed in everyday language. This simplicity also reduces the work needed to turn a goal—gaining access—into a series of technical attempts, but it does not guarantee that those attempts will succeed.

Persistence does not equal effectiveness

Two campaign operations failed to gain access, and their results help measure the episode’s actual scope. Against an unauthenticated Redis server, the agents worked for about 16 hours and 148 actions. They tried, among other techniques, abusing replication, escaping script sandboxing, and modifying configuration files; they also attempted to exploit Log4Shell in another service on the same system. They did not take over the server.

In a second case, the agents gathered nearly 80 usernames from staff directories, lab websites, archived pages, and a university’s academic publications. They then tested more than 30,000 credential combinations for over six hours against SSH and other systems. They did not find a valid password either. Automation sustained the search and expanded the attempts; it did not turn incorrect passwords into access.

The difference between those failures and the MONAI Label case was not that the agents could overcome any defense, but that they found an exploitable flaw and chained it with mechanisms available on the server. For businesses, the operational takeaway is the combination of speed during the successful phase and persistence during the failed ones: security teams may receive signals of activity that continues testing avenues while an alert is being reviewed manually.

The fix and the cost of responding in time

The GitHub advisory details the fix: upload functions now resolve the destination path and reject locations outside the permitted directories. For the image endpoint, the identifier is also reduced to its basename, and empty values or values beginning with a period are rejected. The advisory says the fix will be included in the next MONAI Label release; BleepingComputer reported that the maintainers released a security update on November 18.

The same advisory recommends enabling authentication until an update is applied, not granting the ANNOTATOR role to untrusted users, and not exposing the server to untrusted networks. It also suggests running the service with an unprivileged account and limiting its write permissions to the data directory. These measures reduce the scope of what a malicious request can do, although they do not replace fixing the flaw.

Amazon says it notified the maintainers. Because the affected organizations were not AWS customers and the company had no direct way to contact them, it worked with a government partner to relay the information. The case illustrates a specific challenge for providers and operators: finding and fixing a flaw in a project does not guarantee that every exposed installation receives the notice or applies the fix at the same time.

Automated defense against attacks that do not wait

Amazon says the agents that exploited the 0-day finished before many security operations centers could manually triage an alert. It therefore recommends prioritizing high-confidence detections with automated response and having people oversee the outcomes, rather than requiring them to review every action. This proposal shifts some of the effort away from step-by-step investigation and toward the quality of signals and the limits of automated responses.

This trade-off has consequences for organizations: an automated response can reduce the time between a reliable detection and a defensive action, but Amazon does not present automation as a substitute for oversight. Its recommendation keeps people in control of the outcomes. The practical challenge is distinguishing signals reliable enough to trigger measures without waiting for a full manual review.

Amazon adds that Gambit Security documented another group that used Cairn against online retailers for financial gain. AWS thus places the framework in both espionage operations and criminal activity; BleepingComputer also mentions its use in an attack against a U.S. aerospace organization, a reference that is not developed in Amazon’s analysis. The MONAI Label fix has been released: the immediate question for operators is whether their exposed instances are running the corrected code.

Ч

Sources: MuySeguridad. Computer security., Amazon Web Services, GitHub, BleepingComputer