Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local access to target process
-
DeliveryDeliver crafted model file with malicious imgsz/names/kpt_shape metadata
-
ExploitVictim loads model via AutoBackend
-
Executioneval of metadata executes injected code
-
ImpactCode execution in loader context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to load an attacker-supplied model file through the Ultralytics AutoBackend model-loading routine, where the model metadata fields imgsz, names, or kpt_shape are passed into a dynamic eval and thus interpreted as code. The vector is local (AV:L) - there is no network-facing exposure - and the attack is bounded by the need to deliver a crafted model and have it loaded by a user/process. The input vector assigns PR:L, but in the practical threat model the attacker supplies the malicious artifact rather than holding privileges on the victim host; authentication requirements beyond local model loading are not clearly established. There is no automatic/default-configuration trigger: the limiting factor is that someone must choose to load an untrusted model. |
| Impact | The provided CVSS 4.0 base score is 4.8 (medium) with vector AV:L/AC:L/AT:N/PR:L/UI:N and low impact across confidentiality, integrity and availability (VC:L/VI:L/VA:L). The local attack vector plus a privilege requirement (PR:L) materially constrains real-world risk - this is not a remotely reachable, drive-by flaw. There is no KEV listing, no POC referenced in the input, and no EPSS score was supplied, so exploitation probability cannot be quantified from the data; exploit maturity is explicitly undefined (E:X). Weighing these signals together, this reads as a low-to-moderate priority issue rather than an urgent one: real but gated behind local access and the need for a victim to load an attacker-controlled model. One notable tension: the CWE is CWE-95 (eval injection / improper neutralization of directives in dynamically evaluated code), which typically yields arbitrary code execution with HIGH impact, yet the input vector rates all impacts as LOW - this discrepancy should be verified with the vendor, as a genuine eval-based RCE would warrant a higher impact rating than the supplied score reflects. |
| Exploit ScenarioDerived | An attacker crafts a malicious model file whose metadata fields (imgsz, names, or kpt_shape) embed code directives. When a user loads that model locally through the Ultralytics AutoBackend model-loading path, the tainted metadata is passed into a dynamic evaluation (eval), executing attacker-controlled code in the context of the loading process. No public exploit is identified at time of analysis, and the local attack vector with low complexity means a user who can be induced to open an untrusted model is the realistic victim. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 16, 2026
Code injection in Ultralytics FastSAM's AutoBackend model-loading path lets a crafted model file execute arbitrary Python when its metadata entries (imgsz, names, kpt_shape) are passed into a dynamically evaluated expression from session.get_modelmeta().custom_metadata_map in ultralytics/nn/autobackend.py. The attack is bounded to the local model-loading surface - there is no network-facing exposure - and requires that a user or process loads an attacker-supplied model artifact, so the practical prerequisite is delivering a malicious model to a victim rather than obtaining privileges on the host. VulDB rates it 4.8 (medium) under CVSS 4.0 with low confidentiality/integrity/availability impact and PR:L/UI:N, while our independent assessment scores it CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, i.e. higher impact and requiring user interaction instead of prior authentication; no CISA KEV listing or public exploit code is present in the supplied data, and the maintainers were notified via a GitHub issue but have not responded, so no vendor-released patch is identified at time of analysis.
RemediationAI
No vendor-released patch was identified at time of analysis: the project was informed early via https://github.com/CASIA-LMC-Lab/FastSAM/issues/288 and has not responded, and the VulDB advisory (https://vuldb.com/vuln/420764) provides only the vulnerability record, so there is no exact fixed version to cite for this rolling-release codebase. The most direct mitigation is to stop loading untrusted model artifacts into AutoBackend - restrict model loading to models from trusted sources with cryptographic checksums or signatures, and quarantine models received from external parties - which trades away the convenience of consuming public model zoos. Where custom metadata is not required, strip or neutralize the custom_metadata_map entries (imgsz, names, kpt_shape) from ONNX/other model files before loading, or patch the affected code in ultralytics/nn/autobackend.py to parse those values with a safe literal parser such as ast.literal_eval or an explicit type/range whitelist instead of dynamic evaluation; the trade-off is that models legitimately relying on those metadata fields (for example class names or keypoint shapes) will fail to load or will fall back to defaults. Because exploitation executes with the privileges of the loading process, run model loading and inference inside a sandboxed container with a read-only filesystem, no outbound network access, and no host secrets or credentials mounted; the trade-off is reduced GPU/hardware access and added operational overhead, and this only limits post-exploitation impact rather than preventing code execution. Do not treat exposing the inference service over a network as the primary risk - the vector is local and requires a crafted model to be loaded, so access control on model-upload or model-selection interfaces (restricting who can supply models) is a meaningful compensating control with the side effect of reducing self-service model onboarding.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FastSAM (Fast Segment Anything Model) is a real-time image segmentation framework built on the Ultralytics codebase, and its AutoBackend class in ultralytics/nn/autobackend.py abstracts loading of multiple model formats (PyTorch checkpoints, ONNX, TensorRT, TFLite, etc.) so a single predictor can accept any of them. Inside that loader, the code reads the embedded custom metadata map exposed by session.get_modelmeta().custom_metadata_map and feeds fields such as imgsz, names, and kpt_shape into dynamically evaluated code, which is the classic CWE-95 'Improper Neutralization of Directives in Dynamically Evaluated Code' (eval injection) root cause: model-supplied strings are treated as Python expressions rather than inert data. Because the injected values are only processed at the moment the model file is parsed, the vulnerability class is best described as unsafe deserialization of untrusted model artifacts - the model file itself is the attack payload, and successful injection yields code execution with the privileges of the loading process. The AV:L vector reflects that exploitation cannot be reached across a network interface; the attacker must first place a crafted model on, or transmit it to, the victim machine, and the victim must then choose to load it, which matches the UI:R precondition in our assessment. FastSAM is distributed as a rolling release tracking upstream commits (the report cites commit b4ed20c2fed75eadc5aa7d8b09fedd137b873b52), and the CPE cpe:2.3:a:ultralytics:fastsam:*:*:*:*:*:*:*:* reflects that no fixed version boundary exists in the metadata.
Know when Fastsam gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
CWE-95 eval of crafted model metadata yields arbitrary code execution (C/I/A:H); it is local and needs a victim to load the malicious model, hence AV:L and UI:R with no prior privileges.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
DescriptionCVE.org
A weakness has been identified in Ultralytics FastSAM up to b4ed20c2fed75eadc5aa7d8b09fedd137b873b52. This affects the function session.get_modelmeta.custom_metadata_map of the file ultralytics/nn/autobackend.py of the component AutoBackend Model Loading. This manipulation of the argument imgsz/names/kpt_shape causes improper neutralization of directives in dynamically evaluated code. The attack requires local access. This product uses a rolling release model to deliver continuous updates. As a result, specific version information for affected or updated releases is not available. The project was informed of the problem early through an issue report but has not responded yet.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
EUVD-2026-102551
GHSA-gcxq-hrqr-8hc4
NVD
CVE.org
EPSS
VulDB
Exploit-DB