{"id":"CVE-2026-5318","state":"PUBLISHED","title":"LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write","description":"A weakness has been identified in LibRaw up to 0.22.0. This impacts the function HuffTable::initval of the file src/decompressors/losslessjpeg.cpp of the component JPEG DHT Parser. This manipulation of the argument bits[] causes out-of-bounds write. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 0.22.1 will fix this issue. Patch name: a6734e867b19d75367c05f872ac26322464e3995. It is advisable to upgrade the affected component.","publishedAt":"2026-04-02T01:45:12.421Z","updatedAt":"2026-04-07T11:26:57.754Z","severity":{"score":5.3,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","source":"VulDB"},"assigner":"VulDB","products":["n/a LibRaw"],"affected":[{"vendor":"n/a","product":"LibRaw","versions":[{"version":"0.1","status":"affected"},{"version":"0.2","status":"affected"},{"version":"0.3","status":"affected"},{"version":"0.4","status":"affected"},{"version":"0.5","status":"affected"},{"version":"0.6","status":"affected"},{"version":"0.7","status":"affected"},{"version":"0.8","status":"affected"},{"version":"0.9","status":"affected"},{"version":"0.10","status":"affected"},{"version":"0.11","status":"affected"},{"version":"0.12","status":"affected"},{"version":"0.13","status":"affected"},{"version":"0.14","status":"affected"},{"version":"0.15","status":"affected"},{"version":"0.16","status":"affected"},{"version":"0.17","status":"affected"},{"version":"0.18","status":"affected"},{"version":"0.19","status":"affected"},{"version":"0.20","status":"affected"},{"version":"0.21","status":"affected"},{"version":"0.22.0","status":"affected"},{"version":"0.22.1","status":"unaffected"}],"cpes":["cpe:2.3:a:libraw:libraw:*:*:*:*:*:*:*:*"],"modules":["JPEG DHT Parser"]}],"references":["https://vuldb.com/vuln/354650","https://vuldb.com/vuln/354650/cti","https://vuldb.com/submit/780538","https://github.com/LibRaw/LibRaw/issues/794","https://github.com/LibRaw/LibRaw/issues/794#issuecomment-4065342499","https://github.com/biniamf/pocs/tree/main/libraw_lljpeg","https://github.com/LibRaw/LibRaw/commit/a6734e867b19d75367c05f872ac26322464e3995","https://github.com/LibRaw/LibRaw/releases/tag/0.22.1","https://github.com/LibRaw/LibRaw/"],"weaknesses":["CWE-787","CWE-119"],"ingestedAt":"2026-10-29T20:12:32.778Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/5xxx/CVE-2026-5318.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-5318","state":"PUBLISHED","datePublished":"2026-04-02T01:45:12.421Z","dateUpdated":"2026-04-07T11:26:57.754Z","assignerShortName":"VulDB","assignerOrgId":"1af790b2-7ee1-4545-860a-a788eba489b5","dateReserved":"2026-04-01T12:43:19.844Z"},"containers":{"cna":{"title":"LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write","descriptions":[{"lang":"en","value":"A weakness has been identified in LibRaw up to 0.22.0. This impacts the function HuffTable::initval of the file src/decompressors/losslessjpeg.cpp of the component JPEG DHT Parser. This manipulation of the argument bits[] causes out-of-bounds write. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 0.22.1 will fix this issue. Patch name: a6734e867b19d75367c05f872ac26322464e3995. It is advisable to upgrade the affected component."}],"affected":[{"vendor":"n/a","product":"LibRaw","versions":[{"version":"0.1","status":"affected"},{"version":"0.2","status":"affected"},{"version":"0.3","status":"affected"},{"version":"0.4","status":"affected"},{"version":"0.5","status":"affected"},{"version":"0.6","status":"affected"},{"version":"0.7","status":"affected"},{"version":"0.8","status":"affected"},{"version":"0.9","status":"affected"},{"version":"0.10","status":"affected"},{"version":"0.11","status":"affected"},{"version":"0.12","status":"affected"},{"version":"0.13","status":"affected"},{"version":"0.14","status":"affected"},{"version":"0.15","status":"affected"},{"version":"0.16","status":"affected"},{"version":"0.17","status":"affected"},{"version":"0.18","status":"affected"},{"version":"0.19","status":"affected"},{"version":"0.20","status":"affected"},{"version":"0.21","status":"affected"},{"version":"0.22.0","status":"affected"},{"version":"0.22.1","status":"unaffected"}],"cpes":["cpe:2.3:a:libraw:libraw:*:*:*:*:*:*:*:*"],"modules":["JPEG DHT Parser"]}],"references":[{"url":"https://vuldb.com/vuln/354650","name":"VDB-354650 | LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write","tags":["vdb-entry","technical-description"]},{"url":"https://vuldb.com/vuln/354650/cti","name":"VDB-354650 | CTI Indicators (IOB, IOC, IOA)","tags":["signature","permissions-required"]},{"url":"https://vuldb.com/submit/780538","name":"Submit #780538 | LibRaw 0.22.0 Out-of-bounds Write","tags":["third-party-advisory"]},{"url":"https://github.com/LibRaw/LibRaw/issues/794","tags":["issue-tracking"]},{"url":"https://github.com/LibRaw/LibRaw/issues/794#issuecomment-4065342499","tags":["issue-tracking"]},{"url":"https://github.com/biniamf/pocs/tree/main/libraw_lljpeg","tags":["exploit"]},{"url":"https://github.com/LibRaw/LibRaw/commit/a6734e867b19d75367c05f872ac26322464e3995","tags":["patch"]},{"url":"https://github.com/LibRaw/LibRaw/releases/tag/0.22.1","tags":["patch"]},{"url":"https://github.com/LibRaw/LibRaw/","tags":["product"]}],"metrics":[{"cvssV4_0":{"version":"4.0","baseScore":5.3,"vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","baseSeverity":"MEDIUM"}},{"cvssV3_1":{"version":"3.1","baseScore":4.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C","baseSeverity":"MEDIUM"}},{"cvssV3_0":{"version":"3.0","baseScore":4.3,"vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C","baseSeverity":"MEDIUM"}},{"cvssV2_0":{"version":"2.0","baseScore":5,"vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","type":"CWE","lang":"en","description":"Out-of-bounds Write"}]},{"descriptions":[{"cweId":"CWE-119","type":"CWE","lang":"en","description":"Memory Corruption"}]}],"providerMetadata":{"shortName":"VulDB","orgId":"1af790b2-7ee1-4545-860a-a788eba489b5","dateUpdated":"2026-04-07T11:26:57.754Z"},"timeline":[{"time":"2026-04-01T00:00:00.000Z","lang":"en","value":"Advisory disclosed"},{"time":"2026-04-01T02:00:00.000Z","lang":"en","value":"VulDB entry created"},{"time":"2026-04-07T13:31:44.000Z","lang":"en","value":"VulDB entry last update"}],"credits":[{"lang":"en","value":"biniam (VulDB User)","type":"reporter"}],"tags":["x_open-source"]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-03T19:48:49.260199Z","id":"CVE-2026-5318","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-03T19:48:59.933Z"}}]}}}