medium
MS SWIFT WEB-UI RCE Vulnerability
- Severity
- medium CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- GHSA-7c78-rm87-5673PYSEC-2026-1682
Description
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 interface, fill in required parameters including Model id, Dataset Code. The --output_dir can be filled arbitrarily as it will be modified later through packet capture
-
Click Begin to start training. Capture packets and modify the parameter corresponding to --output_dir
You can see the concatenated command being executed in the terminal where web-ui was started
-
Wait for the program to run (testing shows it requires at least 5 minutes), and you can observe the effect of command execution creating files
II. Vulnerability Proof (Write POC here):
/tmp/xxx'; touch /tmp/inject_success_1; #
III. Fix Solution:
- The swift.ui.llm_train.llm_train.LLMTrain#train() method should not directly concatenate parameters with commands after receiving commands from the frontend
- The swift.ui.llm_train.llm_train.LLMTrain#train_local() method should not use os.system for execution, but should be changed to subprocess.run([cmd, arg1, arg2...]) format
Author
- Discovered by: TencentAISec
- Contact: security@tencent.com
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ms-swift (PyPI) | before 3.7.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-7c78-rm87-5673 changed 2026-07-07 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-1682 changed 2026-07-07 | CC-BY-4.0 |
The CVE List record for this identifier has not been ingested yet. View it at cve.org.