T09 · Insecure Skill Coding Practices
- Location
src/06-intent.md:76- Finding
Cross-Session Media Disclosure Through Unscoped Newest-File Selection
- Content
View full analysis
/dev/null | head -5 ``` Pick the most recent video file (`.mp4`, `.mov`, `.webm`). Use that as the path. ``` ### Technical Analysis When the current message does not expose an attachment path, the Skill enumerates the shared OpenClaw inbound-media directory and selects a video based solely on modification time. It does not verify that the selected file belongs to the current message, user, conversation, or session. The selected file may subsequently be passed to commands such as: ```bash claw3d extract-frame --input --output frame_.jpg claw3d analyze --input frame_.jpg --description "" claw3d convert --image --output model_.glb ``` Analysis and conversion may use Gemini or FAL-backed services. Consequently, selecting the wrong file can result not only in local unauthorized access but also in transmission of another user's media to an external AI provider. Selecting files by recency is especially unsafe in concurrent or multi-user deployments because another upload can become the newest file between the original request and directory enumeration. ### Attack Path 1. A victim uploads a private video to an OpenClaw deployment. 2. The video is stored in `/home/node/.openclaw/media/inbound/`. 3. An attacker initiates a video-processing request for which the current attachment path is unavailable or suppressed. 4. The Skill runs: ```bash ls -t /home/node/.openclaw/media/inbound/ 2>/dev/null | head -5 ``` 5. The victim's video ...[truncated 1104 chars]- Remediation
View remediation
