CVE-2024-41311
NixOS vulnerability analysis and mitigation

Overview

CVE-2024-41311 affects Libheif version 1.17.6, a decoder and encoder for HEIF and AVIF image formats. The vulnerability stems from insufficient checks in ImageOverlay::parse() function when decoding a heif file containing an overlay image with forged offsets, which can lead to out-of-bounds read and write operations. The issue was discovered by Gerrard Tai and was disclosed in July 2024 (Gist Report, NVD).

Technical details

The vulnerability occurs in the ImageOverlay::parse() function where overlay offsets specified in the iloc box are trusted without proper validation. While there are sanity checks in HeifPixelImage::overlay(), these can be bypassed using extremely large or small offsets. The vulnerability has a CVSS 3.1 Base Score of 8.1 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N. The issue is tracked under CWE-125 (Out-of-bounds Read) and CWE-787 (Out-of-bounds Write) (NVD).

Impact

When exploited, this vulnerability can lead to out-of-bounds read and write operations, potentially resulting in information disclosure, code execution, or denial of service. The vulnerability requires a malicious heif file to be decoded by the library (Gist Report).

Exploitability

To exploit the vulnerability, an attacker needs to craft a malicious heif file containing an overlay image with forged offsets. Two proof-of-concept files have been created demonstrating both the out-of-bounds read and write capabilities. The read vulnerability can be triggered using INT_MIN for dx value, while the write vulnerability uses INT_MAX - 10 for the x offset (GitHub Issue).

Mitigation and workarounds

The vulnerability has been fixed in Libheif version 1.18.0 through a patch that implements proper validation of overlay offsets. The fix includes additional checks to ensure that in_y0/x0 and out_x0/y0 are within the bounds of their respective images' dimensions. For Debian 11 bullseye, the fix has been backported to version 1.11.0-1+deb11u1 (Debian Advisory, GitHub PR).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-75874CRITICAL10
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74990CRITICAL9.8
  • NixOS logoNixOS
  • firefox-esr
NoYesAug 18, 2026
CVE-2026-74989CRITICAL9.8
  • NixOS logoNixOS
  • MozillaFirefox-translations-common
NoYesAug 18, 2026
CVE-2026-74988CRITICAL9.8
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74987CRITICAL9.8
  • NixOS logoNixOS
  • firefox-esr
NoYesAug 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management