Advisories for Pypi/Ms-Swift package

2026

ms-swift: Image Cache Hash Collision via Missing Dimension Metadata

A security vulnerability has been detected in modelscope ms-swift up to 4.2.0. This affects the function Template._save_pil_image of the file swift/template/base.py of the component PIL Image Cache Key Handler. The manipulation leads to use of weak hash. An attack has to be approached locally. A high degree of complexity is needed for the attack. It is indicated that the exploitability is difficult. The exploit has been disclosed publicly and may …

2025

MS SWIFT WEB-UI RCE Vulnerability

I. Detailed Description: This includes scenarios, screenshots, vulnerability reproduction methods. For account-related vulnerabilities, please provide test accounts. If the reproduction process is complex, you may record a video, upload it to Taopan, and attach the link. Install ms-swift pip install ms-swift -U Start web-ui swift web-ui –lang en After startup, access through browser at http://localhost:7860/ to see the launched fine-tuning framework program Fill in necessary parameters In the LLM Training …

MS SWIFT Remote Code Execution via unsafe PyYAML deserialization

A Remote Code Execution (RCE) vulnerability exists in the modelscope/ms-swift project due to unsafe use of yaml.load() in combination with vulnerable versions of the PyYAML library (≤ 5.3.1). The issue resides in the tests/run.py script, where a user-supplied YAML configuration file is deserialized using yaml.load() with yaml.FullLoader. If an attacker can control or replace the YAML configuration file provided to the –run_config argument, they may inject a malicious payload that …

MS SWIFT Deserialization RCE Vulnerability

This appears to be a security vulnerability report describing a remote code execution (RCE) exploit in the ms-swift framework through malicious pickle deserialization in adapter model files. The vulnerability allows arbitrary command execution when loading specially crafted adapter models from ModelScope. This occurs when using machine torch version < 2.6.0, while ms-swift accepts torch version >= 2.0 I. Detailed Description: Install ms-swift pip install ms-swift -U Start web-ui swift web-ui …