---
id: CVE-2024-58397
title: 'MP4v2 through 2.1.3 Heap Out-of-Bounds Read via MP4File::GetChapters'
summary: >-
  MP4v2 through 2.1.3 contains a heap-based out-of-bounds read in
  MP4File::GetChapters() that allows attackers to read past heap allocations via
  crafted QuickTime chapter samples. Attackers can supply an MP4 file whose
  chapter sample is sh…
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-125
vendor: enzo1982
product: mp4v2
affected:
  - mp4v2 <= 2.1.3
published: '2026-10-15'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T21:43:16.269Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-58397'
references:
  - url: 'https://hackmd.io/@haind-pwn/mp4v2-getchapters-oob-read'
  - url: 'https://github.com/enzo1982/mp4v2/issues/53'
  - url: >-
      https://github.com/enzo1982/mp4v2/blob/f4c2f1b87446100728472d80fd1161d2f8e830b2/src/mp4file.cpp#L2618-L2627
  - url: 'https://github.com/enzo1982/mp4v2'
  - url: >-
      https://www.vulncheck.com/advisories/mp4v2-through-2.1.3-heap-out-of-bounds-read-via-mp4file-getchapters
    label: >-
      VulnCheck Advisory: MP4v2 through 2.1.3 Heap Out-of-Bounds Read via
      MP4File::GetChapters
tags:
  - cve.org
ingestedAt: '2026-10-15T22:48:25.444Z'
---

## Overview

MP4v2 through 2.1.3 contains a heap-based out-of-bounds read in MP4File::GetChapters() that allows attackers to read past heap allocations via crafted QuickTime chapter samples. Attackers can supply an MP4 file whose chapter sample is shorter than its declared title length, crashing applications like mp4chaps or leaking adjacent heap memory into chapter titles.

## Affected

- `mp4v2 <= 2.1.3`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
