# CVE-2025-50460: MS SWIFT Remote Code Execution via unsafe PyYAML deserialization

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.99%, higher than 81% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-31T14:02:34.000Z
- Modified: 2026-07-07T17:57:29.103Z
- Also known as: GHSA-fm6c-f59h-7mmg, PYSEC-2026-1683
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- ms-swift (PyPI): up to 3.6.3

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Low `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Low `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`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: 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`

## References

- <https://github.com/Anchor0221/CVE-2025-50460> (exploit, web)
- <https://github.com/modelscope/ms-swift> (package)
- <https://github.com/modelscope/ms-swift/blob/main/tests/run.py#L420> (web)
- <https://github.com/advisories/GHSA-6757-jp84-gxfx> (advisory)
- <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)

## Sources

- CVE List: [CVE-2025-50460](https://www.cve.org/CVERecord?id=CVE-2025-50460), CVE Terms of Use, modified 2025-08-01
- GitHub Advisory Database: [GHSA-fm6c-f59h-7mmg](https://github.com/advisories/GHSA-fm6c-f59h-7mmg), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-50460](https://nvd.nist.gov/vuln/detail/CVE-2025-50460), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1683](https://osv.dev/vulnerability/PYSEC-2026-1683), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-50460 · Whole record: https://cve.day/CVE-2025-50460.json · Rebuilt by cve.day 2026-11-25T22:59:01.966Z
