T09 · Insecure Skill Coding Practices
- Location
scripts/imap.js:308- Finding
Path Traversal Through Untrusted Email Attachment Filenames
- Content
View full analysis
``` 3. `mailparser` exposes the attachment filename to `downloadAttachments()`. 4. The code joins the untrusted filename to `outputDir` without canonical containment validation. 5. `fs.writeFileSync()` writes the attachment content to the resulting path. 6. If the process has permission, an existing file outside the download directory may be overwritten. ### Impact Assessment The vulnerability provides file-write capability with the privileges of the Node.js process. The reachable s ...[truncated 502 chars]- Remediation
View remediation
