# CVE-2026-20911: LibRaw heap buffer overflow in HuffTable::initval

Source: https://junglewise.ai/threats/cve-2026-20911-libraw-heap-buffer-overflow-in-hufftable-initval  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-07. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-20911 · Severity: critical · CVSS 9.8 · Published 2026-04-07

LibRaw is a widely used software library for reading and processing RAW image files from digital cameras. A security flaw in how the library handles certain image data allows an attacker to crash applications or potentially execute malicious code by providing a specially crafted image file. This could lead to data theft, system compromise, or service disruptions for any application that uses this library to process user-uploaded photos.

Technologies: [Libraw](https://junglewise.ai/threats/technologies/libraw), [Red Hat Enterprise Linux 6](https://junglewise.ai/threats/technologies/enterprise-linux-6), [Red Hat Enterprise Linux 7](https://junglewise.ai/threats/technologies/enterprise-linux-7), [Red Hat Enterprise Linux 8](https://junglewise.ai/threats/technologies/enterprise-linux-8). Vendors: [Libraw](https://junglewise.ai/threats/vendors/libraw), [Red Hat](https://junglewise.ai/threats/vendors/red-hat).

## Quick answers

**Is CVE-2026-20911 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-20911 being exploited in the wild.

**How severe is CVE-2026-20911?** Critical severity, with a CVSS score of 9.8, published 7 April 2026.

**Which products and versions are affected?** Libraw Commit 0b56545, Commit d20315b, 0.22.0, 0.22.1; Red Hat Enterprise Linux 6 affected; Red Hat Enterprise Linux 7 affected; Red Hat Enterprise Linux 8 affected.

**Is there a fix for CVE-2026-20911?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-20911 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-20911?** Check whether you run Libraw, Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7 or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A heap-based buffer overflow exists in LibRaw's lossless JPEG decoder within the HuffTable::initval function in src/decompressors/losslessjpeg.cpp. The vulnerability is caused by an incorrect calculation of the Huffman lookup table size (CWE-131). The library fails to validate the 'bits' array provided in the image metadata before using it to determine the allocation size and subsequent write operations. An attacker can provide a malicious RAW image file with a crafted Huffman table structure that violates the Kraft inequality, causing the initialization loop to write past the end of the allocated heap buffer. This can be triggered remotely without authentication if an application processes untrusted image files using vulnerable versions of LibRaw.

## Affected products

- LibRaw LibRaw Commit 0b56545, Commit d20315b, 0.22.0, 0.22.1
- Red Hat Enterprise Linux 6 affected
- Red Hat Enterprise Linux 7 affected
- Red Hat Enterprise Linux 8 affected

## Timeline

- 2026-04-07: advisory: Initial advisory published by Talos and NVD
- 2026-06-29: other: Red Hat updated impact assessment for Enterprise Linux versions

## References

- [https://talosintelligence.com/vulnerability_reports/TALOS-2026-2330](https://talosintelligence.com/vulnerability_reports/TALOS-2026-2330)
- [https://www.talosintelligence.com/vulnerability_reports/TALOS-2026-2330](https://www.talosintelligence.com/vulnerability_reports/TALOS-2026-2330)
- [https://access.redhat.com/security/cve/CVE-2026-20911](https://access.redhat.com/security/cve/CVE-2026-20911)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2455959](https://bugzilla.redhat.com/show_bug.cgi?id=2455959)
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-20911.json](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-20911.json)

## Related threats

- [LibRaw heap-based out-of-bounds read in Nikon makernote parsing](https://junglewise.ai/threats/cve-2026-111272-libraw-through-0-22-2-contains-a-heap-based-out-of-bounds-read)
- [LibRaw numeric conversion overflow in TIFF NewSubfileType parsing](https://junglewise.ai/threats/cve-2026-88387-libraw-0-22-0-contains-an-incorrect-numeric-conversion)
- [Samba AD DC LDAP filter injection and ACL bypass in Compare requests](https://junglewise.ai/threats/cve-2026-58222-samba-ad-dc-ldap-filter-injection-and-acl-bypass-in-compare)
- [Samba KDC out-of-bounds read in kpasswd service](https://junglewise.ai/threats/cve-2026-58216-samba-kdc-out-of-bounds-read-in-kpasswd-service)
- [Samba internal DNS server denial of service via TKEY cache exhaustion](https://junglewise.ai/threats/cve-2026-58218-samba-internal-dns-server-denial-of-service-via-tkey-cache)
