CVE-2025-50460 Details
Description
A remote code execution (RCE) vulnerability exists in the ms-swift project version 3.3.0 due to unsafe deserialization in tests/run.py using yaml.load() from the PyYAML library (versions = 5.3.1). If an attacker can control the content of the YAML configuration file passed to the --run_config parameter, arbitrary code can be executed during deserialization. This can lead to full system compromise. The vulnerability is triggered when a malicious YAML file is loaded, allowing the execution of arbitrary Python commands such as os.system(). It is recommended to upgrade PyYAML to version 5.4 or higher, and to use yaml.safe_load() to mitigate the issue.
A remote code execution vulnerability has been identified in the ms-swift project, specifically in version 3.3.0. This vulnerability arises from unsafe deserialization of YAML files in the 'tests/run.py' script, using 'yaml.load()' from the PyYAML library, which is vulnerable through version 5.3.1. When an attacker can control the content of the YAML file provided to the '--run_config' parameter, they can execute arbitrary code during the deserialization process. This exploitation can lead to a full system compromise, as the vulnerability allows for the execution of arbitrary Python commands, such as those using 'os.system()'.
Users are advised to upgrade the PyYAML library to version 5.4 or later and to replace 'yaml.load()' with 'yaml.safe_load()' to mitigate this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 1, 2025CISA-ADP
Assessed Aug 1, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Anchor0221/CVE-2025-50460 | CISA-ADP | ExploitTechnical Description |
| https://github.com/advisories/GHSA-6757-jp84-gxfx | [email protected] | AdvisoryBroken Link |
| https://github.com/Anchor0221/CVE-2025-50460 | [email protected] | ExploitTechnical Description |
| https://github.com/modelscope/ms-swift | [email protected] | ProductVendor |
| https://github.com/modelscope/ms-swift/blob/main/tests/run.py#L420 | [email protected] | Source CodeVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| modelscope/ms-swift | All versions |
CPE
Remediation
| |
| PyYAML | <= 5.3.1 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 1, 2025 | CVE Modified | CISA-ADP |
| Aug 1, 2025 | New CVE Received | [email protected] |
Volerion