CVE-2025-50460
A remote code execution (RCE) vulnerability exists in the ms-swift …
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/Anchor0221/CVE-2025-50460
- github.com/advisories/GHSA-6757-jp84-gxfx
- github.com/modelscope/ms-swift
- github.com/modelscope/ms-swift/blob/main/tests/run.py#L420
- github.com/modelscope/ms-swift/security/advisories/GHSA-fm6c-f59h-7mmg
- github.com/modelscope/ms-swift/pull/5174
- github.com/modelscope/ms-swift/commit/b3418ed9b050dc079553c275c5ed14cfb2b66cf7
- nvd.nist.gov/vuln/detail/CVE-2025-50460
- nvd.nist.gov/vuln/detail/CVE-2025-50460
- cve.org/CVERecord?id=CVE-2025-50460
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.