CVE-2026-5342 Details
Description
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.
A heap-based out-of-bounds read vulnerability has been identified in LibRaw versions through 0.22.0. The issue arises in the function 'LibRaw::nikon_load_padded_packed_raw' within 'src/decoders/decoders_libraw.cpp', specifically when processing TIFF/NEF files. The vulnerability is triggered by a mismatch between the 'load_flags' and 'raw_width' metadata, allowing for an out-of-bounds read during image processing. This vulnerability can be exploited remotely.
Users are advised to upgrade to LibRaw version 0.22.1, which addresses this vulnerability by adding proper validation of the 'load_flags' and 'raw_width' metadata before processing.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/biniamf/pocs/tree/main/libraw_nikonpadded | [email protected] | ExploitThird Party Advisory |
| https://github.com/LibRaw/LibRaw/ | [email protected] | Product |
| https://github.com/LibRaw/LibRaw/commit/b8397cd45657b84e88bd1202528d1764265f185c | [email protected] | Patch |
| https://github.com/LibRaw/LibRaw/issues/795 | [email protected] | Issue Tracking |
| https://github.com/LibRaw/LibRaw/issues/795#issuecomment-4073769886 | [email protected] | Issue Tracking |
| https://github.com/LibRaw/LibRaw/releases/tag/0.22.1 | [email protected] | ProductRelease Notes |
| https://vuldb.com/submit/781223 | [email protected] | ExploitThird Party AdvisoryVDB Entry |
| https://vuldb.com/vuln/354671 | [email protected] | Third Party AdvisoryVDB Entry |
| https://vuldb.com/vuln/354671/cti | [email protected] | Permissions RequiredVDB Entry |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | [email protected] |
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| libraw libraw | < 0.22.1 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 29, 2026 | Initial Analysis | [email protected] |
| Apr 7, 2026 | CVE Modified | [email protected] |
| Apr 2, 2026 | New CVE Received | [email protected] |