T05 · Unauthorized Access and Privilege Escalation
- Location
send-image.sh:8- Finding
Workspace Path Traversal Can Expose Images Outside the Intended Directory
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 ;; esac if [ ! -f "$IMAGE_PATH_REAL" ]; then echo "Error: selected path is not a regular file" >&2 exit 1 fi ``` If nested directories are unnecessary, additionally require: ```bash if [ "$IMAGE_NAME" != "$(basename -- "$IMAGE_NAME")" ]; then echo "Error: only a filename is permitted" >&2 exit 1 fi ``` ]]>
