Image Exposes Location or Privacy Data
ID |
image_exposes_location_or_privacy_data |
Severity |
info |
Kind |
Information Disclosure |
CWE |
200 |
Description
The image was found to contain embedded location information, such as GPS coordinates, or another privacy exposure, such as camera serial number. Depending on the context of the image in the website, this information may expose private details of the users of a site. For example, a site that allows users to upload profile pictures taken in the home may expose the home’s address.
Rationale
Embedded EXIF metadata in images can leak GPS coordinates revealing home addresses, workplace locations, or travel patterns when photos are uploaded to public or semi-public websites. Camera serial numbers and timestamps enable correlation across images to track individuals. Attackers harvest this metadata for stalking, burglary planning, or social engineering by building detailed profiles of victims' routines and locations without their knowledge.
Remediation
Implement server-side EXIF data stripping for all uploaded images before storage or display. Use libraries like ImageMagick, Pillow (Python), or ExifTool to remove GPS coordinates, camera serial numbers, timestamps, and other sensitive metadata. At minimum, strip GPS-related tags, but consider removing all EXIF data except orientation information needed for proper display. Apply this processing automatically during the upload pipeline to prevent accidental exposure.