How Platforms Strip Unsafe Metadata from AVIF

When users upload AVIF images to social platforms, those files often contain hidden metadata that poses privacy and security risks, including precise GPS coordinates, device serial numbers, and potentially malicious payload injection. To protect user privacy and safeguard backend infrastructure, social media networks route incoming AVIF uploads through automated media processing pipelines. These pipelines deconstruct the file format, discard non-essential metadata blocks, sanitize color and rendering properties, and transcode the raw visual payload into a secure, normalized output file.

The Security and Privacy Risks in AVIF Files

AVIF (AV1 Image File Format) utilizes the ISO Base Media File Format (ISOBMFF) container. Within this structure, metadata is encapsulated in distinct boxes or items. The primary areas of concern include:

The Ingest and Sandboxed Parsing Stage

Before an AVIF file touches a social platform's primary storage or Content Delivery Network (CDN), it enters an isolated ingest environment.

To mitigate container-level exploits, platforms deploy sandboxed worker instances using isolation tools like gVisor, WebAssembly (Wasm), or hardened containers with restricted system calls via seccomp. Parsers evaluate the high-level ISOBMFF box hierarchy. If the parser detects malformed box headers, nested loops, or excessive allocation sizes, the file is rejected immediately before further processing occurs.

Deconstruction and Metadata Stripping

Platforms typically do not sanitize files by simply searching for and deleting specific metadata bytes. Instead, they employ an "allowlist-only" deconstruction model:

  1. Box Extraction: The demuxer identifies the image item (the primary AV1 compressed bitstream) and separates it from auxiliary metadata items.
  2. Dropping Non-Essential Boxes: The platform explicitly ignores and drops any non-essential boxes, including exif, xml (XMP), iptc, and all uuid records.
  3. Color and Orientation Sanitization: Images often require orientation tags and color profiles to display correctly. Rather than passing through raw user-supplied color metadata, the platform reads the essential properties—such as the NCLX (colour information) box or the ICC profile—validates their bounds, and discards any embedded application-specific chunks.

Transcoding and Pixel Normalization

The most effective method social platforms use to neutralize metadata-borne threats is full decoding and re-encoding:

During the re-encoding step, the system generates a brand-new container from scratch. The newly generated ISOBMFF container contains only the essential image items, standardized rendering parameters, and platform-generated metadata, completely free from the original user-submitted metadata.