# CVE-2026-5342: LibRaw TIFF/NEF decoders\_libraw.cpp nikon\_load\_padded\_packed\_raw out-of-bounds

- Priority: **Routine**
- Reason: Not severe (CVSS 6.9, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-04-02 · Modified: 2026-04-07
- Aliases: UBUNTU-CVE-2026-5342, DEBIAN-CVE-2026-5342
- Record: https://cvemate.com/vulnerability/CVE-2026-5342 · JSON: https://cvemate.com/vulnerability/CVE-2026-5342/json

## Description

```text
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.
```

## Signals

- CVSS: 6.9 medium (v4.0, CVE.org) 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
- EPSS: 0.835%, percentile 58.972%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (github, reference)

## Affected

- debian libraw (Debian): \< 0.20.2-2.1+deb12u2 \| \< 0.21.4-2+deb13u1 \| \< 0.22.1-1
- ubuntu darktable (Ubuntu): All versions (No fix recorded)
- ubuntu dcraw (Ubuntu): All versions (No fix recorded)
- ubuntu digikam (Ubuntu): All versions (No fix recorded)
- ubuntu exactimage (Ubuntu): All versions (No fix recorded)
- ubuntu kodi (Ubuntu): All versions (No fix recorded)
- ubuntu libraw (Ubuntu): \< 0.20.2-2ubuntu2.22.04.3 \| \< 0.21.2-2.1ubuntu0.24.04.2 \| All versions (No fix recorded) \| \< 0.21.5b-1ubuntu1.1
- ubuntu rawtherapee (Ubuntu): All versions (No fix recorded)
- ubuntu ufraw (Ubuntu): All versions (No fix recorded)
- libraw libraw: \< 0.22.1

## References

- <https://vuldb.com/vuln/354671>
- <https://vuldb.com/vuln/354671/cti>
- <https://vuldb.com/submit/781223>
- <https://github.com/LibRaw/LibRaw/issues/795>
- <https://github.com/LibRaw/LibRaw/issues/795#issuecomment-4073769886>
- <https://github.com/biniamf/pocs/tree/main/libraw_nikonpadded>
- <https://github.com/LibRaw/LibRaw/commit/b8397cd45657b84e88bd1202528d1764265f185c>
- <https://github.com/LibRaw/LibRaw/releases/tag/0.22.1>
- <https://github.com/LibRaw/LibRaw/>
- <https://ubuntu.com/security/CVE-2026-5342>
- <https://www.cve.org/CVERecord?id=CVE-2026-5342>
- <https://ubuntu.com/security/notices/USN-8522-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-5342>

---

Data as of 2026-12-05T03:32:14.816Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
