CVE-2026-20911
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-20911 is a heap-based buffer overflow vulnerability in the HuffTable::initval function of LibRaw, an open-source C/C++ library for reading and processing RAW image files from digital cameras. The flaw exists in LibRaw commits 0b56545 and d20315b (corresponding to versions 0.22.0 and 0.22.1), and was discovered by Francesco Benvenuto of Cisco Talos. Initial vendor contact occurred on 2026-02-12, a patch was released on 2026-04-06, and public disclosure followed on 2026-04-07. It carries a CVSS v3.1 base score of 9.8 (Critical) (Talos Advisory, GitHub Advisory).

Technical details

The root cause is an incorrect calculation of buffer size (CWE-131) in HuffTable::initval within src/decompressors/losslessjpeg.cpp. The function accepts a _bits array directly from attacker-controlled image data and uses it to allocate a Huffman lookup table of size 2^nbits, where nbits is the highest bit-length index with a non-zero entry. However, the total number of entries written by the nested loop can exceed 2^nbits if the bits array violates the Kraft inequality — a mathematical property required for valid prefix-free codes — which is never validated. For example, setting bits[5]=100 and bits[6]=1 causes an allocation of 64 entries but attempts to write 201, triggering a heap buffer overflow. The vulnerability is reachable via LibRaw::sony_ycbcr_load_raw()LibRaw::unpack() when processing a malicious RAW image file (Talos Advisory).

Impact

Successful exploitation can result in a heap buffer overflow write, potentially enabling remote code execution with the privileges of the process using LibRaw. Given the library's widespread use in image processing applications, exploitation could lead to full confidentiality, integrity, and availability compromise of affected systems. An attacker who achieves code execution could exfiltrate sensitive data, install persistent malware, or pivot laterally within a network (Talos Advisory, Red Hat Bugzilla).

Exploitability

The vulnerability is network-exploitable with no authentication or user interaction required (AV:N/AC:L/PR:N/UI:N), making it trivially weaponizable in any context where a server or application automatically processes untrusted RAW image files. Cisco Talos published a technical report (TALOS-2026-2330) with crash information and a proof-of-concept file (poc_huffman.cpp), though no weaponized exploit kit or in-the-wild exploitation has been confirmed as of the time of disclosure. The EPSS score is approximately 0.043–0.078%, indicating a currently low but non-negligible probability of exploitation in the near term. There is no current CISA KEV catalog listing for this CVE (Talos Advisory, GitHub Advisory).

Exploitation steps

  1. Craft a malicious RAW image file: Create a specially crafted RAW image (e.g., Sony YCbCr format) with a manipulated lossless JPEG Huffman table segment. Set the bits array to violate the Kraft inequality — for example, bits[5]=100, bits[6]=1, all others zero — so that the number of entries to be written (201) far exceeds the allocated table size (64).
  2. Deliver the malicious file: Provide the crafted file to a target system that uses LibRaw for image processing. This could be via file upload to a web application, email attachment, or any network-accessible service that automatically decodes RAW images.
  3. Trigger parsing: The application calls LibRaw::unpack(), which invokes LibRaw::sony_ycbcr_load_raw(), which constructs a LibRaw_LjpegDecompressor object and calls HuffTable::initval with the attacker-controlled bits array.
  4. Heap buffer overflow: The hufftable vector is allocated with 64 entries (2^6), but the nested loop writes 201 entries, overflowing the heap buffer at losslessjpeg.cpp:374.
  5. Achieve code execution: By carefully controlling heap layout and overflow content, an attacker can overwrite adjacent heap metadata or function pointers to redirect execution flow and achieve arbitrary code execution (Talos Advisory).

Indicators of compromise

  • File System: Presence of unexpected or anomalous RAW image files (e.g., .ARW, .CR2, .NEF, .DNG) with malformed Huffman table segments in upload directories or temporary processing folders.
  • Process: Crashes or abnormal termination of applications using LibRaw (e.g., image viewers, photo management software, web services) with AddressSanitizer-style heap-buffer-overflow errors referencing losslessjpeg.cpp:374 or HuffTable::initval.
  • Logs: Application crash logs or core dumps referencing LibRaw::sony_ycbcr_load_raw(), LibRaw_LjpegDecompressor::initialize(), or HuffTable::initval; error messages indicating heap corruption during RAW file processing.
  • Network: Unusual inbound file uploads of RAW image formats to services that process them automatically, particularly from untrusted or external sources; unexpected outbound connections from image-processing services following file ingestion.

Mitigation and workarounds

The vendor released a patch on 2026-04-06; organizations should update LibRaw to a version beyond commits 0b56545 and d20315b (i.e., beyond versions 0.22.0 and 0.22.1) as documented in the GitHub Advisory GHSA-rc49-6x7v-hf76. OpenSUSE and other Linux distributions have issued security update advisories for their LibRaw packages, which should be applied promptly. As an interim workaround where patching is not immediately possible, restrict network access to systems that process untrusted RAW image files and limit file ingestion to trusted, validated sources only (GitHub Advisory, Red Hat Bugzilla).

Community reactions

Cisco Talos published a detailed technical blog post covering this and related LibRaw vulnerabilities, which was picked up by Malware News and discussed on social platforms including Bluesky (Talos Blog). The vulnerability was also referenced in the CISA weekly vulnerability bulletin for the week of April 6, 2026, and discussed on the oss-security mailing list. Community reaction has been focused on the critical CVSS score and the lack of input validation for a widely-used image processing library.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

libraw

Fixed

sid

libraw: 0.22.1-1

Fixed

trixie

libraw

Fixed

Ubuntu

Unknown

bionic (esm-apps)

ufraw

Unknown

bionic (esm-infra)

libraw

Not Affected

devel

libraw

Not Affected

focal (esm-apps)

darktable

Unknown

focal (esm-infra)

libraw

Not Affected

jammy

libraw

Not Affected

jammy (esm-apps)

darktable

Unknown

noble

libraw

Not Affected

RHEL / CentOS

Affected

RHEL 8

libraw1394.src

Affected

RHEL 9

Not Affected

Alpine

Fixed

edge

libraw: 0.22.1-r0

Fixed

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-86738CRITICAL9.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86734HIGH7.1
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86735MEDIUM5.9
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86737MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86736MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 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