T09 · Insecure Skill Coding Practices
- Location
scripts/generate_bid.py:1027- Finding
Insufficient Filename Validation Allows ZIP Output Path Traversal
- Content
View full analysis
/标书文档包_x/../../destination.zip ``` If the intermediate prefixed directory exists, filesystem path resolution can escape the intended archive directory. The code also does not resolve the resulting path and verify that it remains under an approved destination. Opening the resulting path with `zipfile.ZipFile(..., 'w')` creates the file or truncates an existing file. No symbolic-link or destination-file protections are applied. ### Attack Path 1. An attacker supplies or modifies the JSON information file consumed through `--info`. 2. The attacker places path separat ...[truncated 1025 chars]- Remediation
View remediation
