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).

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-2025-68120MEDIUM5.4
  • NixOSNixOS
  • go
NoYesDec 30, 2025
CVE-2025-69413MEDIUM5.3
  • NixOSNixOS
  • code.gitea.io/gitea
NoYesJan 01, 2026
CVE-2025-15412MEDIUM4.8
  • NixOSNixOS
  • wabt
NoNoJan 01, 2026
CVE-2025-15411MEDIUM4.8
  • NixOSNixOS
  • wabt
NoNoJan 01, 2026
CVE-2025-68932LOW2.9
  • NixOSNixOS
  • freshrss
NoYesDec 27, 2025

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