CVE-2025-68431: libheif has Potential Heap Buffer Over-Read

Published Dec 29, 2025
·
Updated

libheif has Potential Heap Buffer Over-Read

Other sources

libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in HeifPixelImage::overlay(). The function computes a negative row length (likely from an unclipped overlay rectangle or invalid offsets), which then underflows when converted to sizet and is passed to memcpy, causing a very large read past the end of the source plane and a crash. Version 1.21.0 contains a patch. As a workaround, avoid decoding images using iovl overlay boxes.

— MITRE

Affected Software

14 affected componentsFixes available
libheif<1.21.0
struktur Libheif<1.21.0
alpine/libheif<1.19.8-r1
1.19.8-r1
alpine/libheif<1.21.2-r0
1.21.2-r0
alpine/libheif<1.21.2-r0
1.21.2-r0
ubuntu/libheif<1.1.0-2ubuntu0.1~esm2
1.1.0-2ubuntu0.1~esm2
ubuntu/libheif<1.6.1-1ubuntu0.1~esm2
1.6.1-1ubuntu0.1~esm2
ubuntu/libheif<1.12.0-2ubuntu0.1~esm2
1.12.0-2ubuntu0.1~esm2
ubuntu/libheif<1.17.6-1ubuntu4.2
1.17.6-1ubuntu4.2
ubuntu/libheif<1.20.2-1ubuntu0.1
1.20.2-1ubuntu0.1
ubuntu/libheif<1.21.2-1
1.21.2-1
debian/libheif<1.19.8-1+deb13u1
1.19.8-1+deb13u1
debian/libheif<1.21.2-1
1.21.2-1
debian/libheif
1.19.8-1+deb13u11.21.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/libheif to a version that resolves this vulnerability.

    Fixed in 1.19.8-r1
  2. Upgrade

    Upgrade alpine/libheif to a version that resolves this vulnerability.

    Fixed in 1.21.2-r0
  3. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.1.0-2ubuntu0.1~esm2
  4. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.6.1-1ubuntu0.1~esm2
  5. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.12.0-2ubuntu0.1~esm2
  6. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.17.6-1ubuntu4.2
  7. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.20.2-1ubuntu0.1
  8. Upgrade

    Upgrade ubuntu/libheif to a version that resolves this vulnerability.

    Fixed in 1.21.2-1
  9. Upgrade

    Upgrade debian/libheif to a version that resolves this vulnerability.

    Fixed in 1.19.8-1+deb13u1
  10. Upgrade

    Upgrade debian/libheif to a version that resolves this vulnerability.

    Fixed in 1.21.2-1
  11. Upgrade

    Upgrade debian/libheif to a version that resolves this vulnerability.

    Fixed in 1.19.8-1+deb13u1Fixed in 1.21.2-1
  12. Upgrade

    Upgrade libheif to a version that resolves this vulnerability.

    Fixed in 1.21.0
  13. Configuration

    Avoid decoding images using iovl overlay boxes.

    libheif iovl overlay image decoding = disabled

Event History

Dec 29, 2025
CVE Published
via MITRE·07:09 PM
Data Sourced
via MITRE·07:09 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·07:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Feb 25, 2026
Data Sourced
via NVD·02:53 PM
RemedyAffected Software
Updated
via NVD·02:53 PM
Severity
Event
via NVD·02:53 PM
Nov 17, 2026
Data Sourced
via Microsoft·06:35 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-68431?

CVE-2025-68431 has been classified as a moderate severity vulnerability due to the potential for heap buffer over-read.

2

How do I fix CVE-2025-68431?

To fix CVE-2025-68431, update libheif to version 1.21.0 or later.

3

What could be the impact of CVE-2025-68431?

The impact of CVE-2025-68431 could lead to unexpected behavior and possible exploitation due to heap buffer over-read.

4

On which versions of libheif is CVE-2025-68431 found?

CVE-2025-68431 affects versions of libheif prior to 1.21.0.

5

What type of vulnerability is CVE-2025-68431?

CVE-2025-68431 is a heap buffer over-read vulnerability triggered by crafted HEIF files.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203