# CVE-2025-59729: Heap-buffer-overflow read in FFmpeg DHAV get\_duration

- Priority: **Routine**
- Reason: Not severe (CVSS 5.7, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-10-06 · Modified: 2025-10-06
- Aliases: UBUNTU-CVE-2025-59729, DEBIAN-CVE-2025-59729, CGA-2vv4-h359-8mc2, CGA-65pg-h2mm-jchf, CGA-q5xh-5h3j-qmqf, CGA-w6cj-x4qg-433f, CGA-253g-gh8p-j39q, CGA-2v98-j7g6-2hmq, CGA-4rp4-wfp8-p35g, CGA-6646-5mc4-x7v8, CGA-6rjc-fwx2-85hm, CGA-7gmm-c9rv-p3xx, CGA-8wp3-9q6g-xpvx, CGA-9rgv-r4m2-7gq9, CGA-9xjw-w4hc-2pgj, CGA-cgh5-pw7c-jgv8, CGA-cj4f-x2wp-3p35, CGA-gc66-m593-jhw4, CGA-hx9x-3fg9-8jrx, CGA-jgfp-9q8r-8fmq, CGA-mrvq-mf7x-3822, CGA-p26h-qjp9-87fm, CGA-ph3r-7r6h-cgw5, CGA-pvrm-2pmq-3m3h, CGA-r3mm-36gr-7pw3, CGA-rw28-5j3r-fp5h, CGA-wcc7-r2fq-fmrw, CGA-x458-5r5p-72v6, ALPINE-CVE-2025-59729
- Record: https://cvemate.com/vulnerability/CVE-2025-59729 · JSON: https://cvemate.com/vulnerability/CVE-2025-59729/json

## Description

```text
When parsing the header for a DHAV file, there's an integer underflow in offset calculation that leads to reading the duration from before the start of the allocated buffer.

If we load a DHAV file that is larger than MAX_DURATION_BUFFER_SIZE bytes (0x100000) for example 0x101000 bytes, then at [0] we have size = 0x101000. At [1] we have end_buffer_size = 0x100000, and at [2] we have end_buffer_pos = 0x1000.

The loop then scans backwards through the buffer looking for the dhav tag; when it is found, we'll calculate end_pos based on a 32-bit offset read from the buffer.

There is subsequently a check [3] that end_pos is within the section of the file that has been copied into end_buffer, but it only correctly handles the cases where end_pos is before the start of the file or after the section copied into end_buffer, and not the case where end_pos is within the the file, but before the section copied into end_buffer. If we provide such an offset, (end_pos - end_buffer_pos) can underflow, resulting in the subsequent access at [4] occurring before the beginning of the allocation.

We recommend upgrading to version 8.0 or beyond.
```

## Signals

- CVSS: 5.7 medium (v4.0, CVE.org) CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N
- EPSS: 0.162%, percentile 5.599%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine ffmpeg (Alpine Linux): \< 8.0-r0
- chainguard eco-python-ffmpeg-6-minimal (Chainguard): \< 6.1.6-r3
- chainguard eco-python-ffmpeg-6-minimal-dev (Chainguard): \< 6.1.6-r3
- chainguard eco-python-ffmpeg-6-minimal-static (Chainguard): \< 6.1.6-r3
- chainguard eco-python-ffmpeg-7-minimal (Chainguard): \< 7.1.5-r2
- chainguard eco-python-ffmpeg-7-minimal-dev (Chainguard): \< 7.1.5-r2
- chainguard eco-python-ffmpeg-7-minimal-static (Chainguard): \< 7.1.5-r2
- chainguard ffmpeg-6 (Chainguard): \< 6.1.6-r5
- chainguard ffmpeg-7 (Chainguard): \< 7.1.5-r3
- chainguard ffmpeg-7.1 (Chainguard): \< 7.1.5-r4
- chainguard torchaudio-ffmpeg-tarballs (Chainguard): \< 1-r2
- chainguard torchaudio-ffmpeg-tarballs-4.4.4 (Chainguard): \< 1-r2
- chainguard torchaudio-ffmpeg-tarballs-5.0.3 (Chainguard): \< 1-r2
- chainguard torchaudio-ffmpeg-tarballs-6.0 (Chainguard): \< 1-r2
- wolfi ffmpeg-7 (Wolfi): \< 7.1.5-r3
- wolfi ffmpeg-7.1 (Wolfi): \< 7.1.5-r4
- debian ffmpeg (Debian): All versions (No fix recorded)
- ubuntu libav (Ubuntu): All versions (No fix recorded)
- ffmpeg ffmpeg: ≥ a218cafe4d3be005ab0c61130f90db4d21afb5db, \< 8.0

## References

- <https://issuetracker.google.com/433513232>
- <https://ubuntu.com/security/CVE-2025-59729>
- <https://www.cve.org/CVERecord?id=CVE-2025-59729>
- <https://security-tracker.debian.org/tracker/CVE-2025-59729>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59729.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59729>
- <https://git.ffmpeg.org/ffmpeg.git>
- <https://security.alpinelinux.org/vuln/CVE-2025-59729>

---

Data as of 2026-12-05T06:22:19.324Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
