Browse / Unsafe Model Loading and Supply Chain / CVE-2025-51427
ModelScope is vulnerable to arbitrary code injection via a crafted module
- Class
- Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
- Technique
- Code and command execution
- Affected
- modelscope (PyPI)
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- EPSS
- 0.5% chance of exploitation in 30 days
How it works, in short
A module path named in a model configuration file is imported without checks, so loading a crafted config runs attacker-chosen code. (Our summary, written by a model. The source text is below.)
Details
An issue was discovered in ModelScope 1.25.0 allowing attackers to execute arbitrary code via crafted module listed in the configuration file (dey_mini.yaml) under the key ['nnet']['module'].
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-51427
- https://github.com/modelscope/modelscope/issues/1331
- https://github.com/modelscope/modelscope/pull/1333
- https://github.com/modelscope/modelscope/commit/75d54927e112261d39598ca08c15b66a7ff3f735
- https://github.com/JIRUWOZHI/vulnerability-disclosure/blob/main/CVE-2025-51427/CVE_2025_51427.md
- https://github.com/modelscope/modelscope
Source: GitHub Advisory Database, used under CC BY 4.0.