
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-20889 is a heap-based buffer overflow vulnerability in the x3f_thumb_loader functionality of LibRaw (Commit d20315b), an open-source C/C++ library for reading and processing RAW image files. A specially crafted malicious X3F file can trigger a heap buffer overflow, potentially enabling arbitrary code execution. The vulnerability was discovered by Francesco Benvenuto of Cisco Talos, with initial vendor contact on 2026-02-12, a patch released on 2026-04-06, and public disclosure on 2026-04-07. It carries a CVSS v3.1 base score of 9.8 (Critical) (Talos Report, GitHub Advisory).
The root cause is an integer overflow (CWE-190) combined with a classic buffer overflow (CWE-120) in LibRaw::x3f_thumb_loader() within src/x3f/x3f_parse_process.cpp. The ID->columns, ID->rows, and ID->row_stride fields are read directly from the attacker-controlled X3F thumbnail section header as uint32_t values. The buffer size is calculated as columns * rows * 3 using 32-bit arithmetic; when the product exceeds UINT32_MAX (4,294,967,295), it wraps around, causing malloc() to allocate a much smaller buffer than intended. For example, with columns = 50000 and rows = 30000, the intended allocation is ~4.2 GB but the overflowed value results in only ~195 MB being allocated; the subsequent loop then writes ~4.2 GB via memmove(), overflowing the heap by ~4 GB. Exploitation requires LibRaw to be compiled with -DUSE_X3FTOOLS (not enabled by default), and any application calling unpack_thumb() on untrusted X3F files is affected (Talos Report).
Successful exploitation can result in heap corruption and potential arbitrary code execution on the host running the vulnerable LibRaw-based application, with full confidentiality, integrity, and availability impact. An unauthenticated remote attacker can deliver a malicious X3F file through any channel that causes the application to process it (e.g., file upload, email attachment, web service), without requiring user interaction or elevated privileges. Downstream applications embedding LibRaw — such as image editors, photo management tools, and media processing pipelines — are all potentially affected if compiled with X3F support (Talos Report, Red Hat Bugzilla).
No confirmed public exploit or proof-of-concept code is available; the Cisco Talos report (TALOS-2026-2358) provides technical analysis and source code snippets but no weaponized payload or step-by-step attack guide. There is no evidence of in-the-wild exploitation, no threat actor attribution, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.043% (0.000430), indicating a low near-term exploitation probability (Talos Report, GitHub Advisory).
columns and rows to large uint32_t values (e.g., columns = 50000, rows = 30000) such that columns * rows * 3 overflows 32-bit arithmetic, producing a small truncated allocation size.row_stride to a small value: Use row_stride = 1 so the source bounds check (offset + columns * 3 > data_size) is satisfied with minimal pixel data in the file, allowing the overflow loop to proceed.LibRaw::unpack_thumb() on untrusted input — this could be via file upload, email, shared storage, or a web API endpoint that processes RAW images.x3f_thumb_loader(), which allocates a small heap buffer (~195 MB for the example values) but iterates using the original large rows value.memmove() call at each loop iteration writes beyond the allocated buffer boundary, corrupting adjacent heap memory and potentially enabling arbitrary code execution under the application's privileges (Talos Report).columns/rows values).malloc failures, or memmove-related crashes when handling X3F files; crash dumps referencing LibRaw::x3f_thumb_loader() or src/x3f/x3f_parse_process.cpp.The vendor released a patch on 2026-04-06; users should update LibRaw to a version beyond Commit d20315b as soon as possible. Red Hat has addressed the issue across multiple RHEL versions via errata RHSA-2026:13284 (RHEL 8), RHSA-2026:14224 (RHEL 8.4), RHSA-2026:14655 (RHEL 8.6), and RHSA-2026:14673 (RHEL 8.8); openSUSE and Amazon Linux 2 have also issued updates. As a workaround, avoid compiling LibRaw with -DUSE_X3FTOOLS if X3F/Sigma camera support is not required, and restrict or sanitize untrusted X3F file input to applications using LibRaw (Red Hat Bugzilla, GitHub Advisory).
Cisco Talos published a detailed technical blog post covering this and related vulnerabilities in LibRaw and Foxit, providing source-level analysis of the overflow mechanism (Talos Blog). The vulnerability was picked up by the oss-security mailing list and aggregated by security news outlets including malware.news. Social media activity was limited, with some security community accounts sharing the Talos advisory. Overall community reaction was measured, noting the non-default compilation requirement (-DUSE_X3FTOOLS) as a significant mitigating factor reducing the practical attack surface.
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
ufraw
bionic (esm-infra)
libraw
devel
libraw: 0.22.1-1ubuntu1
focal (esm-apps)
darktable
focal (esm-infra)
libraw
jammy
libraw: 0.20.2-2ubuntu2.22.04.3
jammy (esm-apps)
darktable
noble
libraw: 0.21.2-2.1ubuntu0.24.04.2
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."