CVE-2026-5342

LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds

Published Apr 2, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The LibRaw library, widely used for decoding camera RAW files, contains a flaw in its Nikon padded packed RAW decoder (nikon_load_padded_packed_raw) inside the TIFF/NEF component. By providing a specially crafted image with manipulated load_flags or raw_width values, an attacker can trigger an out‑of‑bounds read, allowing the program to read data beyond the intended buffer. While the current published exploit only demonstrates a memory disclosure, the vulnerability could be combined with other techniques to potentially reach remote code execution if additional memory corruption is achieved.

Affected Systems

Any installation of LibRaw version 0.22.0 or earlier is vulnerable. This includes developers and applications that link against LibRaw to process Nikon RAW images and other libraries that embed LibRaw for image decoding.

Risk and Exploitability

The vulnerability carries a medium CVSS score of 6.9 and has been demonstrated as exploitable over the network. The EPSS score is not available, and it is not listed in the CISA KEV catalog. Attackers can remotely supply a malicious image to trigger the out‑of‑bounds read, making the risk fairly tangible for services that accept untrusted image uploads. The impact could range from exposure of sensitive data to a potential compromise if additional weaknesses are leveraged.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade LibRaw to version 0.22.1 or later, which contains a patch for the out‑of‑bounds read in nikon_load_padded_packed_raw.
  • Verify the library version post‑upgrade by checking the released version string or querying the application’s version interface.
  • If an upgrade is not immediately possible, configure the application or library to reject or skip Nikon padded packed RAW files, thereby preventing the vulnerable decoding path.
  • Continuously monitor the LibRaw GitHub repository and security advisories for further updates or additional mitigations.

Generated by OpenCVE AI on April 2, 2026 at 15:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4704-1 libraw security update
Ubuntu USN Ubuntu USN USN-8522-1 LibRaw vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds
First Time appeared Libraw
Libraw libraw
Weaknesses CWE-119
CWE-125
CPEs cpe:2.3:a:libraw:libraw:*:*:*:*:*:*:*:*
Vendors & Products Libraw
Libraw libraw
References
Metrics cvssV2_0

{'score': 5, 'vector': 'AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C'}

cvssV3_0

{'score': 5.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C'}

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P'}

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-125

    Out-of-bounds Read

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Apr 7, 2026, 11:27 AM
Reserved
Apr 1, 2026, 2:52 PM
Status
Analyzed
Published
Apr 2, 2026, 3:16 PM
Modified
Jul 24, 2026, 9:10 PM
Severity
Moderate
Public date
Apr 2, 2026, 2:30 PM