MooreThreads torch_musa Unsafe Deserialization Vulnerability in compare_tool Module Allowing Remote Code Execution

Vulnerability

A vulnerability allowing unsafe deserialization has been identified in the MooreThreads torch_musa library, specifically within the utility module 'torch_musa.utils.compare_tool'. This vulnerability exists in all versions of the library. The issue arises in two functions, 'compare_for_single_op' and 'nan_inf_track_for_single_op', which use 'pickle.load()' to deserialize user-controlled file paths without proper validation. This flaw enables arbitrary code execution, as an attacker can create a malicious pickle file that executes Python code when loaded, potentially leading to remote code execution with the privileges of the victim process.

Impact

Exploitation of this vulnerability allows for arbitrary code execution, with the executed code running under the privileges of the user who initiated the process.

Reproduction

The vulnerability can be reproduced by creating a malicious pickle file that, when deserialized by the vulnerable functions, executes arbitrary code. This can be done by crafting a pickle file that includes a payload designed to execute a command or script during the unpickling process. Once the malicious file is created, it can be loaded using the vulnerable functions, triggering the execution of the embedded code.

Added: Dec 15, 2025, 7:18 PM
Updated: Dec 15, 2025, 7:18 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
8.7
remediation
0.0
relevance
1.5
threat
6.4
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.