Image attachments retain EXIF metadata (including GPS location) — served back verbatim to any user with ticket access #97

Open
opened 2026-09-01 00:13:38 -04:00 by jared · 0 comments
Owner

Severity: Medium (privacy)

api/upload_attachment.php does a raw move_uploaded_file() with zero image processing anywhere in the codebase (confirmed: no GD/Imagick calls exist in the app at all). A photo attached from a phone (e.g. documenting a hardware issue on-site) retains its embedded EXIF data, including GPS coordinates if the phone's camera app embeds them, and download_attachment.php streams the file byte-for-byte back to any user with ticket visibility.

Impact: For an infrastructure company, this can leak a data center or office's precise physical location through a routine ticket photo — especially concerning for internal/confidential tickets whose whole point is restricting who sees exactly this kind of sensitive detail, when the leak happens via file bytes rather than the visibility-checked ticket text.

Fix: Strip EXIF (or at minimum GPS tags) from image uploads before storing — e.g. read with exif_read_data()/GD, strip metadata, and re-encode before writing to disk.

**Severity:** Medium (privacy) `api/upload_attachment.php` does a raw `move_uploaded_file()` with zero image processing anywhere in the codebase (confirmed: no GD/Imagick calls exist in the app at all). A photo attached from a phone (e.g. documenting a hardware issue on-site) retains its embedded EXIF data, including GPS coordinates if the phone's camera app embeds them, and `download_attachment.php` streams the file byte-for-byte back to any user with ticket visibility. **Impact:** For an infrastructure company, this can leak a data center or office's precise physical location through a routine ticket photo — especially concerning for `internal`/`confidential` tickets whose whole point is restricting who sees exactly this kind of sensitive detail, when the leak happens via file bytes rather than the visibility-checked ticket text. **Fix:** Strip EXIF (or at minimum GPS tags) from image uploads before storing — e.g. read with `exif_read_data()`/GD, strip metadata, and re-encode before writing to disk.
jared added the priority/mediumsecurity labels 2026-09-08 10:15:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/tinker_tickets#97