Intel

AIKIDO-2025-10510

modelscope is vulnerable to Remote Code Execution (RCE)

Remote Code Execution (RCE) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 31, 2025

55

Medium Risk

This Affects:

PYTHONmodelscope
1.0.0 - 1.28.0
Fixed in 1.28.1
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to arbitrary code execution due to unsafe deserialization of user-controlled input when using plugins. Specifically, the model_revision parameter can be exploited to inject and execute arbitrary Python code, posing a significant security risk in environments where untrusted input reaches the pipeline function. The issue is addressed in the patched version by introducing the trust_remote_code parameter in the from_pretrained function, which controls whether remote code execution is allowed. By default, this parameter is set to False, preventing unauthorized or untrusted code from being executed.

Who does this affect?

You are affected if you are using a version which is within vulnerability ranges.

Background info

modelscope is vulnerable to Remote Code Execution (RCE) in versions 1.0.0 - 1.28.0.

How to fix this

Upgrade the modelscope library to the patch version.