Skip to main content

MooreThreads torch_musa CVE-2025-65213

CRITICAL
Deserialization of Untrusted Data (CWE-502)
2025-12-15 cve@mitre.org
9.8
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious pickle payload file
  2. Delivery
    Deliver file to torch_musa user
  3. Exploit
    Victim runs compare_tool on file
  4. Execution
    pickle.load() executes embedded code
  5. Impact
    Arbitrary code execution as victim

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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 invoke torch_musa.utils.compare_tool.compare_for_single_op() or nan_inf_track_for_single_op() with a file path that the attacker controls, because those functions call pickle.load() on that path without validation. The limiting factors are significant: this is a developer/debugging comparison utility (not the normal training/inference path), so the attacker must get a malicious pickle file in front of a user and induce them to run the comparison on it - i.e. it depends on user interaction and local file access rather than default remote exposure. Affects torch_musa through all versions per the description.

Impact

The input assigns CVSS 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) and a public exploit exists (referenced via the MooreThreads GitHub issue), so publicly available exploit code exists. However, the CVSS vector and the technical description conflict and this must be verified: the flaw is a CWE-502 pickle.load() on a user-controlled file path inside a developer/debugging utility (torch_musa.utils.compare_tool), which realistically requires a victim to run compare_for_single_op() or nan_inf_track_for_single_op() against an attacker-supplied pickle file. That implies local file delivery and user interaction, not the unauthenticated remote, zero-interaction profile that AV:N/UI:N/PR:N encodes - treat the 9.8 as a theoretical worst case rather than a drive-in RCE. No EPSS score was provided, so real-world exploitation probability could not be weighed; this CVE is not in CISA KEV, so there is no public exploit identified at time of analysis as actively exploited. Net: a genuine, trivially weaponizable code-execution bug (pickle RCE is reliable and the attack complexity is low), but its practical reach is gated by whether an operator feeds untrusted data to a niche comparison tool, so the effective priority is lower than the 9.8 suggests for most deployments.

Exploit ScenarioDerived

An attacker distributes a malicious tensor/op comparison dump (a crafted pickle file) to a developer who uses Moore Threads torch_musa to validate MUSA GPU operator outputs. When the victim runs compare_for_single_op() or nan_inf_track_for_single_op() against that file, pickle.load() executes the attacker's embedded Python, giving code execution with the victim process's privileges. Public exploit code is referenced in the project's GitHub issue tracker.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
No patch listed yet 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 14, 2026

Arbitrary code execution in MooreThreads torch_musa arises from unsafe pickle deserialization in the torch_musa.utils.compare_tool module, where compare_for_single_op() and nan_inf_track_for_single_op() call pickle.load() on an attacker-influenced file path without validation. Every version of the package is affected, and publicly available exploit code exists (referenced in the MooreThreads GitHub issue tracker), though no CISA KEV entry confirms active exploitation. Although NVD scores this 9.8 with a network vector, our assessment is that practical exploitation depends on user interaction: the victim must run one of these developer/debugging comparison functions against a malicious pickle file they can reach, since the code path is not the normal training/inference flow and requires the attacker to deliver a file and induce the user to compare it. Successful exploitation runs arbitrary Python with the privileges of the victim process, giving high confidentiality, integrity, and availability impact.

RemediationAI

No vendor-released patch has been identified at time of analysis, so remediation must lean on containment until upstream guidance appears; monitor https://github.com/MooreThreads/torch_musa/issues/110 for a fix or an official PSIRT advisory. Immediate compensating controls: stop invoking torch_musa.utils.compare_tool.compare_for_single_op() and nan_inf_track_for_single_op() on any pickle file that did not originate from a trusted, access-controlled source, and never point these helpers at a path supplied by a user, CI artifact, downloaded dataset, or bug report (the trade-off is that this disables a useful operator-debugging workflow). If the comparison tool must remain in use, run it only on files under a directory writable solely by trusted accounts, and execute it inside a least-privilege sandbox or container with no network access, no credentials, and a read-only filesystem except for an isolated scratch directory (trade-off: adds operational overhead and can mask legitimate comparison failures). Where the tool's source can be modified locally, replace the raw pickle.load() calls with a safe loader - a restricted unpickler that whitelists only tensor/numpy classes, or a non-executable format such as safetensors/npz - accepting that legacy pickle artifacts will need conversion. Apply filesystem monitoring or EDR rules for Python processes in the environment that spawn shells or write unusual files, as this is the most reliable detection of a successful unpickling attack given there is no patch to deploy.

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

torch_musa is MooreThreads' PyTorch-compatible extension that exposes MUSA GPU acceleration through the torch APIs. The vulnerable component, torch_musa.utils.compare_tool, is a developer-facing utility used to compare operator outputs between reference and MUSA executions. The root cause is CWE-502 (Deserialization of Untrusted Data): the functions compare_for_single_op() and nan_inf_track_for_single_op() accept a file path and hand it directly to Python's pickle.load() with no validation, allowlist, or restricted unpickler. Python pickle is not a safe data format against untrusted input, because opcodes such as REDUCE and GLOBAL let a crafted stream import arbitrary modules and invoke callables (most commonly os.system or equivalent) during unpickling, before any caller-side checks can run. Because the sink is a file-path argument rather than a network listener, the exposure is bounded by who can place a file where the victim's comparison run will read it, and by whether the victim actually invokes the tool on that file - which is why the assessed vector is local with user interaction (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) rather than the network/no-interaction 9.8 reported by NVD in the CPE-referenced cpe:2.3:a:mthreads:torch_musa:*:*:*:*:*:*:*:*.

Know when Python 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

Vendor (mitre) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Exploitation needs the victim to run the compare utility against an attacker-supplied pickle file, so AV:L and UI:R; deserialization yields full code execution, so C/I/A all High.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

MooreThreads torch_musa through all versions contains an unsafe deserialization vulnerability in torch_musa.utils.compare_tool. The compare_for_single_op() and nan_inf_track_for_single_op() functions use pickle.load() on user-controlled file paths without validation, allowing arbitrary code execution. An attacker can craft a malicious pickle file that executes arbitrary Python code when loaded, enabling remote code execution with the privileges of the victim process.

Executive ViewAI

Why It Matters

MooreThreads' torch_musa library, a GPU acceleration toolkit used by AI/ML engineering teams, contains an arbitrary code execution flaw in its debugging comparison utilities that affects every version of the package released to date. Any engineer or build system that runs these comparison functions against an untrusted model or tensor file can be induced to execute attacker-controlled code with that user's own credentials and access rights. Because no vendor fix exists and this package typically lives on high-trust research workstations and training clusters that hold proprietary models and broad cloud credentials, leadership should treat this as a material risk to development infrastructure rather than a routine library defect.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: remove, rename, or block the torch_musa/utils/compare_tool.py module (and its compare_for_single_op/nan_inf_track_for_single_op entry points) in production and CI images; prohibit loading pickle or tensor files from untrusted or externally supplied sources; run any process that must import torch_musa under a least-privilege, network-restricted account or disposable sandbox; enforce application allowlisting and file-origin controls on development and training hosts; deploy endpoint detection for pickle-file delivery and anomalous Python child-process behavior; and monitor the referenced MooreThreads GitHub issue for a patched release to deploy on availability.

Threat Intelligence Overview

EPSS Score
0.7%
Top 47% exploitable
Prevalence
Low
niche Moore Threads MUSA GPU PyTorch adaptation, developer-focused footprint
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.7%
Patch available No
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

70
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +49
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

cpe:2.3:a:mthreads:torch_musa:*:*:*:*:*:*:*:*

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy