---
id: "CVE-2026-111212"
kind: "vulnerability"
aliases: ["CVE-2026-111212"]
title: "Medical-SAM-Adapter: model loading lets a local file run injected code"
severity: "medium"
cvss: 4.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["medical-imaging", "ml-models", "package", "python", "self-hosted"]
not_affected_if: ["other-versions", "trusted-models-only"]
published_at: "2026-10-16T03:18:03+00:00"
first_seen_at: "2026-10-23T21:57:12+00:00"
updated_at: "2026-10-25T04:34:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-111212", "first_seen_at": "2026-10-23T21:57:12+00:00"}]
---

# Medical-SAM-Adapter: model loading lets a local file run injected code

ImprintLab Medical-SAM-Adapter 0.1.0 and 0.1.0-alpha load model metadata through AutoBackend, which evaluates crafted imgsz, names or kpt_shape values as code. A local attacker who supplies a malicious model file can run commands as the user loading it, and a public exploit exists.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the project in use is Medical-SAM-Adapter at `0.1.0-alpha` or `0.1.0`.
- Look for `models/MobileSAMv2/ultralytics/nn/autobackend.py` in the codebase and see whether `custom_metadata_map` is evaluated with `eval` or `exec`.
- Confirm whether untrusted model files are loaded from disk or shared storage.

## Timeline

- 2026-10-23T21:57:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-111212

## From the sources

A security flaw has been discovered in ImprintLab Medical-SAM-Adapter 0.1.0-alpha/0.1.0. Affected by this issue is the function session.get_modelmeta.custom_metadata_map of the file models/MobileSAMv2/ultralytics/nn/autobackend.py of the component AutoBackend Model Loading. The manipulation of the argument imgsz/names/kpt_shape results in improper neutralization of directives in dynamically evaluated code. The attack requires a local approach. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
