CVE-2026-5342 LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds
Remote attackers can trigger an out-of-bounds read in LibRaw's NEF decoder via crafted images, potentially exposing memory or causing crashes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-5342?
CVE-2026-5342 is a medium-severity memory corruption vulnerability in Libraw Libraw, published on 2 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-5342?
It affects 1 product.
Products include Libraw Libraw.
How do I fix CVE-2026-5342?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-5342 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-5342 exists.
Other vulnerabilities in Libraw Libraw
Sources
Also known as AZL-82940, CLSA-2026-1785515066, CLSA-2026-1786702952, DEBIAN-CVE-2026-5342, ECHO-b728-5f8b-4ad6, GHSA-jp35-q64r-j6gf and 2 more.