Heap-based Buffer Overflow Affecting gpac4ios package, versions >=0.0.0

  • Exploit Maturity

    Proof of concept

  • Attack Complexity


  • Confidentiality


  • Integrity


  • Availability


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    19 Aug 2021

  • disclosed

    19 Aug 2021

  • credit

    Cisco Talos

How to fix?

There is no fixed version for GPAC4iOS.


GPAC4iOS is a GPAC4iOS is the libgpac library packaged for iOS as a Pod. It is preconfigured and tested to do a single task: create a MP4 file from a raw H.264 and an audio track.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow. In order to parse an atom with the “name” FOURCC code, the following function will be used. This function will first take the 64-bit size and truncate it to a 32-bit integer at line 16. After storing the size, the library will then add 1 to it and use it at line 17 to allocate a buffer on the heap. If the 32-bit size is set to UINT_MAX, this addition will cause an integer overflow resulting in a zero-sized allocation being made. Later at line 18, when the library uses the 32-bit length, the library will read data from the input into the undersized buffer resulting in a large heap-based buffer overflow.