CVE-2025-8176 LibTIFF tiffmedian.c get_histogram use after free

Medium 4.8 Published Updated

A local attacker can exploit a use-after-free flaw in LibTIFF's tiffmedian tool to potentially execute arbitrary code or cause a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-8176?

CVE-2025-8176 is a medium-severity use after free vulnerability in Libtiff Libtiff, published on 26 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A vulnerability was found in LibTIFF up to 4.7.0. It has been declared as critical. This vulnerability affects the function get_histogram of the file tools/tiffmedian.c. The manipulation leads to use after free. The attack needs to be approached locally. The exploit has been disclosed to the public and may be used. The patch is identified as fe10872e53efba9cc36c66ac4ab3b41a839d5172. It is recommended to apply a patch to fix this issue.

Weakness: CWE-416, CWE-119

Which versions are affected by CVE-2025-8176?

It affects 1 product.

Linux distribution packages (13)
libtiff AlmaLinux:8All versions4.0.9-36.el8_10
libtiff-devel AlmaLinux:8All versions4.0.9-36.el8_10
libtiff-tools AlmaLinux:8All versions4.0.9-36.el8_10
libtiff Red Hat:enterprise_linux:8::appstreamAll versions0:4.0.9-36.el8_10
libtiff-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:4.0.9-36.el8_10
libtiff-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:4.0.9-36.el8_10
libtiff-devel Red Hat:enterprise_linux:8::appstreamAll versions0:4.0.9-36.el8_10
libtiff-tools-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:4.0.9-36.el8_10
libtiff-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:4.0.9-36.el8_10
libtiff-debugsource Red Hat:enterprise_linux:8::crbAll versions0:4.0.9-36.el8_10
libtiff-tools Red Hat:enterprise_linux:8::crbAll versions0:4.0.9-36.el8_10
libtiff-tools-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:4.0.9-36.el8_10
libtiff Rocky Linux:8All versions0:4.0.9-36.el8_10

Products include Libtiff Libtiff.

How do I fix CVE-2025-8176?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-8176 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-8176 exists.

All Libtiff Libtiff vulnerabilities

Sources

Also known as ALSA-2025:20034, AZL-65973, AZL-65981, BELL-CVE-2025-8176, CLSA-2026-1786038772, DEBIAN-CVE-2025-8176 and 10 more.

Is CVE-2025-8176 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free