CVE-2025-50460
CRITICAL 9.8CVSS 3.1MS SWIFT Remote Code Execution via unsafe PyYAML deserialization
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.
- Published
- 1 Aug 2025
- Last modified
- 7 Jul 2026
- Assigned by
- cve@mitre.org
- NVD status
- Deferred
- Weakness
- CWE-502
- Also known as
- GHSA-fm6c-f59h-7mmgPYSEC-2026-1683
- Sources
- NVDJSONOSV GHSA-fm6c-f59h-7mmgJSONOSV PYSEC-2026-1683JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N | |
| OSV | PyPA | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N | |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | ms-swift | <= 3.6.3 |
References
- https://github.com/Anchor0221/CVE-2025-50460 · WEB
- https://github.com/advisories/GHSA-6757-jp84-gxfx · ADVISORY
- https://github.com/modelscope/ms-swift · PACKAGE
- https://github.com/modelscope/ms-swift/blob/main/tests/run.py#L420 · WEB
- https://github.com/modelscope/ms-swift/security/advisories/GHSA-fm6c-f59h-7mmg · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-50460 · ADVISORY
- https://github.com/modelscope/ms-swift/pull/5174 · WEB
- https://github.com/modelscope/ms-swift/commit/b3418ed9b050dc079553c275c5ed14cfb2b66cf7 · WEB
- https://pypi.org/project/ms-swift · PACKAGE
- https://github.com/advisories/GHSA-fm6c-f59h-7mmg · ADVISORY
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 1 Aug 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 31 Jul 2025)