CVE-2025-50460 MS SWIFT Remote Code Execution via unsafe PyYAML deserialization
Attackers can execute arbitrary code via unsafe YAML deserialization in ms-swift if they control the configuration file, requiring an upgrade to PyYAML.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-50460?
CVE-2025-50460 is a critical unsafe deserialization vulnerability in n/a, published on 1 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-502
Which versions are affected by CVE-2025-50460?
3 open source packages ship an affected version, including ms-swift.
| Package | Affected | Fixed in |
|---|---|---|
ms-swift PyPI | All versions to 3.6.3 | None |
ms-swift PyPI | All versions to 3.6.3 | None |
ms-swift PyPI | All versions to 3.6.3 | None |
How do I fix CVE-2025-50460?
No fix has been published for CVE-2025-50460 yet. Limit exposure of the affected software until one is available.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2025-50460 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-50460 exists.
Public exploit code: 2 proofs of concept on GitHub.
Sources
Also known as GHSA-fm6c-f59h-7mmg, PYSEC-2026-1683.