{"id":"CVE-2026-5342","summary":"LibRaw TIFF/NEF decoders_libraw.cpp nikon_load_padded_packed_raw out-of-bounds","details":"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.","modified":"2026-10-28T10:51:58.335982163Z","published":"2026-04-02T14:30:14.897Z","related":["SUSE-SU-2026:1555-1","SUSE-SU-2026:1556-1","SUSE-SU-2026:21360-1","openSUSE-SU-2026:10565-1","openSUSE-SU-2026:20574-1"],"database_specific":{"cna_assigner":"VulDB","cwe_ids":["CWE-119","CWE-125"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5342.json","unresolved_ranges":[{"extracted_events":[{"range":[{"introduced":"0.1"},{"last_affected":"0.1"},{"introduced":"0.2"},{"last_affected":"0.2"},{"introduced":"0.3"},{"last_affected":"0.3"},{"introduced":"0.4"},{"last_affected":"0.4"},{"introduced":"0.5"},{"last_affected":"0.5"},{"introduced":"0.6"},{"last_affected":"0.6"},{"introduced":"0.7"},{"last_affected":"0.7"},{"introduced":"0.8"},{"last_affected":"0.8"},{"introduced":"0.9"},{"last_affected":"0.9"},{"introduced":"0.10"},{"last_affected":"0.10"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"}]}]},"references":[{"type":"WEB","url":"https://github.com/LibRaw/LibRaw/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5342.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5342"},{"type":"ADVISORY","url":"https://vuldb.com/submit/781223"},{"type":"ADVISORY","url":"https://vuldb.com/vuln/354671"},{"type":"REPORT","url":"https://github.com/LibRaw/LibRaw/issues/795"},{"type":"REPORT","url":"https://github.com/LibRaw/LibRaw/issues/795#issuecomment-4073769886"},{"type":"REPORT","url":"https://vuldb.com/vuln/354671/cti"},{"type":"FIX","url":"https://github.com/LibRaw/LibRaw/commit/b8397cd45657b84e88bd1202528d1764265f185c"},{"type":"FIX","url":"https://github.com/LibRaw/LibRaw/releases/tag/0.22.1"},{"type":"EVIDENCE","url":"https://github.com/biniamf/pocs/tree/main/libraw_nikonpadded"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/libraw/libraw","events":[{"introduced":"76b3641bc36b9642d7bd0ee5d10591c456bd6b36"},{"fixed":"b8397cd45657b84e88bd1202528d1764265f185c"},{"fixed":"b860248a89d9082b8e0a1e202e516f46af9adb29"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"0.11"},{"last_affected":"0.11"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"range":[{"introduced":"0.12"},{"last_affected":"0.12"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"range":[{"introduced":"0.13"},{"last_affected":"0.13"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion","range":[{"introduced":"0.14"},{"last_affected":"0.14"}]},{"range":[{"introduced":"0.15"},{"last_affected":"0.15"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"strategy":"StandaloneSingleVersion","range":[{"introduced":"0.16"},{"last_affected":"0.16"}],"source":"AFFECTED_FIELD"},{"range":[{"introduced":"0.17"},{"last_affected":"0.17"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"range":[{"introduced":"0.18"},{"last_affected":"0.18"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"range":[{"introduced":"0.19"},{"last_affected":"0.19"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion","range":[{"introduced":"0.20"},{"last_affected":"0.20"}]},{"range":[{"introduced":"0.21"},{"last_affected":"0.21"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"},{"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion","range":[{"introduced":"0.22.0"},{"last_affected":"0.22.0"}]},{"source":"REFERENCES_COMMIT","range":[{"fixed":"b8397cd45657b84e88bd1202528d1764265f185c"}]},{"range":[{"fixed":"b860248a89d9082b8e0a1e202e516f46af9adb29"}],"source":"REFERENCES_TAG","original_tag":"0.22.1"}]}}],"versions":["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"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5342.json","vanir_signatures":[{"source":"https://github.com/libraw/libraw/commit/b8397cd45657b84e88bd1202528d1764265f185c","target":{"file":"src/metadata/tiff.cpp","function":"LibRaw::apply_tiff"},"deprecated":false,"digest":{"length":18461,"function_hash":"75762778109458427875769868541149481938"},"id":"CVE-2026-5342-1c5ba764","signature_type":"Function","signature_version":"v1"},{"deprecated":false,"digest":{"function_hash":"84981703727095246191539248690892626236","length":1156},"id":"CVE-2026-5342-313d2854","signature_type":"Function","signature_version":"v1","source":"https://github.com/libraw/libraw/commit/b8397cd45657b84e88bd1202528d1764265f185c","target":{"function":"LibRaw::nikon_load_padded_packed_raw","file":"src/decoders/decoders_libraw.cpp"}},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/libraw/libraw/commit/b8397cd45657b84e88bd1202528d1764265f185c","target":{"file":"src/decoders/decoders_libraw.cpp"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["28244586361528992352522152194319482398","92157897365039769988828882281683992520","249419145314412054435341265046189754782","147838370502341082218215597431389232700","268852207816429060776474755319238157629","19833769672006721639578250071944379213","108147390792519766460047328957182456943","193998266684608617211010662832227538321","9342119849890528820223737516730364104","138232008353031034202073290338649308539","132295669638616007946044778428761391761","51145738289976052827562857012528571353","279545017355210863464581914152843540103","126576192636509665505602364602811841240","100569988196465285714214852750654529770","276122923454765561941918136488648270401","35727505169355187103433350353149522185"]},"id":"CVE-2026-5342-33412754"},{"source":"https://github.com/libraw/libraw/commit/b8397cd45657b84e88bd1202528d1764265f185c","target":{"file":"src/metadata/tiff.cpp"},"deprecated":false,"digest":{"line_hashes":["237739710694465869779659605822927391528","284840264059880553985438553535815150122","193763208134149196329007091648312408011","16778219902612833982178182206358732840","256008877216685110381393122834397204954"],"threshold":0.9},"id":"CVE-2026-5342-ce793a40","signature_type":"Line","signature_version":"v1"}],"vanir_signatures_modified":"2026-10-28T10:51:58Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}