T09 · Insecure Skill Coding Practices
- Location
pack_widget.py:133- Finding
Path Traversal Enables Recursive Deletion Outside the Output Directory
- Content
View full analysis
/../important.wdgt`. 4. `os.path.exists()` confirms that the attacker-selected directory exists. 5. `shutil.rmtree()` recursively deletes that directory. 6. The program creates a replacement widget directory at the same location. An absolute widget name can similarly cause `os.path.join()` to ignore `output_dir`. ### Impact Assessment An attacker who can control command-line arguments can recursively delete any directory writable by the process, provided the resolved target ends in `.wdgt`. The impact ...[truncated 270 chars]- Remediation
View remediation
