CVE-2025-50460 json
MS SWIFT Remote Code Execution via unsafe PyYAML deserialization
published 2025-07-31 15 mo ago modified 2026-07-07 4 mo ago also GHSA-fm6c-f59h-7mmg , PYSEC-2026-1683 , EUVD-2025-23369
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.9%
- EPSS 2.9% chance of exploitation in 30 days, percentile 86%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- github.com/modelscope/ms-swift@b3418ed commit
- github.com/modelscope/ms-swift#5174 pull request
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 15 mo ago
Exploit prediction
2.88% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/Anchor0221/CVE-2025-50460 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | ms-swift | <=3.6.3 |
no fix listed |
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/modelscope/ms-swift/pull/5174
web
-
github.com
/modelscope/ms-swift/commit/b3418ed9b050dc079553c275c5ed14cfb2b66cf7
web
-
github.com
/Anchor0221/CVE-2025-50460
exploit, web
-
github.com
/modelscope/ms-swift
package
-
github.com
/modelscope/ms-swift/blob/main/tests/run.py#L420
web
-
github.com
/advisories/GHSA-6757-jp84-gxfx
advisory
-
github.com
/modelscope/ms-swift/security/advisories/GHSA-fm6c-f59h-7mmg
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-50460
advisory
-
pypi.org
/project/ms-swift
package
-
github.com
/advisories/GHSA-fm6c-f59h-7mmg
advisory
Sources
- CVE List CVE-2025-50460
- GitHub Advisory GHSA-fm6c-f59h-7mmg
- NVD CVE-2025-50460
- OSV PYSEC-2026-1683
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.