CVE-2025-59729

Heap-buffer-overflow read in FFmpeg DHAV get_duration

5.7 medium EPSS 0.16%

Published 6 Oct 2025 Updated 6 Oct 2025 CNA: Google

Check your servers for CVE-2025-59729

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-59729 affects dhav, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

5.7 medium CVSS 4.0 from Google (CNA)
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
Attack vector
adjacent: the attacker has to be on the same local network or link
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Attack requirements
present: an attack works only when the target is in a certain state or configuration
Privileges required
low: the attacker needs an ordinary user account
User interaction
passive: a user has to take part without knowing, such as by viewing a page
Impact on the vulnerable system
confidentiality low, integrity high, availability none: what an attacker can read, change or stop in the vulnerable component
Impact on other systems
confidentiality low, integrity high, availability none: what an attacker can read, change or stop beyond it

Exploitation

EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.65% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 6 Oct 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

Affected products

As the CNA lists them.

ProductVersions
FFmpeg
package DHAV
affected from a218cafe4d3be005ab0c61130f90db4d21afb5db, before 8.0
Other versions: unaffected

Is my server affected?

Find the installed version of dhav and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i dhav
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-59729 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-59729

RHEL, Rocky, Alma, Fedora

rpm -q dhav
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-59729

Alpine

apk list --installed | grep -i dhav

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-59729
trivy image --scanners vuln IMAGE | grep CVE-2025-59729

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-59729 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.