| 标题 | XiangLi1999 Diffusion-LM commit 759889d58ef38e2eed41a8c34db8032e072826f4 (main branch head, no fixed release) OS Command Injection |
|---|
| 描述 | A vulnerability was found in Diffusion-LM commit 759889d58ef38e2eed41a8c34db8032e072826f4 and classified as high 8.8. Affected is the infill.py script of the improved-diffusion component. The manipulation of the argument notes (delivered through the training_args.json sidecar inside a model checkpoint directory) leads to os command injection. User interaction is required because the victim must run the documented inference command against the attacker-supplied checkpoint.
Technical Details
- Affected file/function: improved-diffusion/scripts/infill.py, main() at lines 34-40, eval() at lines 752-762, gate at lines 765-769
- Vulnerable parameter: notes (and verbose) read from training_args.json next to --model_path and merged wholesale over the CLI argument namespace
- Attack vector: Network (checkpoint distribution), User Interaction Required
- Privileges required: None
- Trigger condition: the victim runs `python scripts/infill.py --model_path <checkpoint>/model.pt`; the notes value is embedded verbatim into an output file name which is concatenated unquoted into an os.system command string, and the checkpoint-controlled verbose flag gates the sink (`if args.verbose != 'pipe'`)
Impact
- Confidentiality: High (arbitrary command execution exposes user-readable data)
- Integrity: High (arbitrary command execution allows arbitrary modification)
- Availability: High (arbitrary command execution allows destruction of data)
CVSS v3.1
Score: 8.8 (High)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Timeline
- Discovered: 2026-10-17
- Vendor notified: 2026-10-18
- Patch released: [pending]
- Public disclosure: [pending]
Countermeasure
Load only the model-architecture keys from training_args.json instead of merging the file wholesale, validate or encode notes before using it in file names, replace os.system with an argument-list subprocess call, and constrain verbose to an enum of its supported values. |
|---|
| 来源 | ⚠️ https://github.com/XiangLi1999/Diffusion-LM/issues/79 |
|---|
| 用户 | Dem000 (UID 98389) |
|---|
| 提交 | 2026-10-21 09時34分 (1 月前) |
|---|
| 管理 | 2026-11-19 22時56分 (30 days later) |
|---|
| 状态 | 已接受 |
|---|
| VulDB条目 | 440906 [XiangLi1999 Diffusion-LM 直到 759889d58ef38e2eed41a8c34db8032e072826f4 infill.py os.system notes 权限提升] |
|---|
| 积分 | 20 |
|---|