# CVE-2026-5342: LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds

- Severity: Medium 6.9 (CVSS:4.0, scored by VulDB) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.83%, higher than 58% of CVEs (2026-12-02)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-04-02T14:30:14.897Z
- Modified: 2026-07-24T21:10:00.143Z
- Weaknesses: CWE-119, CWE-125
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: VulDB

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

(As written by CVE List.)

## Affected

- 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; and 10 more (not affected: 0.22.1)
- libraw libraw: before 0.22.1

## Every score

- VulDB: CVSS:4.0 6.9 Medium `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`
- VulDB: CVSS:3.1 5.3 Medium `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`
- VulDB: CVSS:3.0 5.3 Medium `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`
- VulDB: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C`

## References

- <https://vuldb.com/submit/781223> (exploit, third-party-advisory, vdb-entry)
- <https://github.com/biniamf/pocs/tree/main/libraw_nikonpadded> (exploit, third-party-advisory)
- <https://vuldb.com/vuln/354671> (technical-description, third-party-advisory, vdb-entry)
- <https://vuldb.com/vuln/354671/cti> (permissions-required, signature, vdb-entry)
- <https://github.com/LibRaw/LibRaw/issues/795> (issue-tracking)
- <https://github.com/LibRaw/LibRaw/issues/795#issuecomment-4073769886> (issue-tracking)
- <https://github.com/LibRaw/LibRaw/commit/b8397cd45657b84e88bd1202528d1764265f185c> (patch)
- <https://github.com/LibRaw/LibRaw/releases/tag/0.22.1> (patch, product, release-notes)
- <https://github.com/LibRaw/LibRaw/> (product)

## Sources

- CVE List: [CVE-2026-5342](https://www.cve.org/CVERecord?id=CVE-2026-5342), CVE Terms of Use, modified 2026-04-07
- NVD: [CVE-2026-5342](https://nvd.nist.gov/vuln/detail/CVE-2026-5342), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-5342 · Whole record: https://cve.day/CVE-2026-5342.json · Rebuilt by cve.day 2026-11-25T22:59:17.802Z
