Buffer overflow in Libraw
CVE-2026-5342
A flaw has been found in LibRaw up to 0.22.0. This affects the function LibRaw::nikon_load_padded_packed_raw of the file src/decoders/decoders_libraw.cpp of the component TIFF/NEF. Executing a manipulation of the argument load_flags/raw_width can lead to out-of-bounds read. It is possible to launch the attack remotely. The exploit has been published and may be used. Upgrading to version 0.22.1 mitigates this issue. This patch is called b8397cd45657b84e88bd1202528d1764265f185c. It is advisable to upgrade the affected component.
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
EPSS exploit prediction
EPSS 0.008, 56.0th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Libraw
- Libraw — versions 0.1, 0.2, 0.3
Weakness classification (CWE)
References
- VDB-354671 | LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds (technical-description, Third Party Advisory, VDB Entry, vdb-entry)
- VDB-354671 | CTI Indicators (IOB, IOC, IOA) (signature, Permissions Required, permissions-required, VDB Entry)
- Submit #781223 | LibRaw 0.22.0 Out-of-Bounds Read (Exploit, Third Party Advisory, VDB Entry, third-party-advisory)
- github.com/LibRaw/LibRaw/issues/795 (issue-tracking, Issue Tracking)
- github.com/LibRaw/LibRaw/issues/795 (issue-tracking, Issue Tracking)
- github.com/biniamf/pocs/tree/main/libraw_nikonpadded (Exploit, Third Party Advisory, exploit)
- github.com/LibRaw/LibRaw/commit/b8397cd45657b84e88bd1202528d1764265f185c (Patch, patch)
- github.com/LibRaw/LibRaw/releases/tag/0.22.1 (Product, Release Notes, patch)
- github.com/LibRaw/LibRaw/ (Product, product)