# CVE-2026-5318: LibRaw JPEG DHT losslessjpeg.cpp initval out-of-bounds write

- Severity: Medium 5.3 (CVSS:4.0, scored by VulDB) `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`
- 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.71%, higher than 54% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-04-02T01:45:12.421Z
- Modified: 2026-06-17T10:58:48.457Z
- Weaknesses: CWE-119, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulDB

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

(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 5.3 Medium `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`
- VulDB: CVSS:3.1 4.3 Medium `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`
- VulDB: CVSS:3.0 4.3 Medium `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`
- 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`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L`

## References

- <https://vuldb.com/submit/780538> (exploit, third-party-advisory, vdb-entry)
- <https://github.com/biniamf/pocs/tree/main/libraw_lljpeg> (exploit, third-party-advisory)
- <https://vuldb.com/vuln/354650> (technical-description, third-party-advisory, vdb-entry)
- <https://vuldb.com/vuln/354650/cti> (permissions-required, signature, vdb-entry)
- <https://github.com/LibRaw/LibRaw/issues/794> (issue-tracking)
- <https://github.com/LibRaw/LibRaw/issues/794#issuecomment-4065342499> (issue-tracking)
- <https://github.com/LibRaw/LibRaw/commit/a6734e867b19d75367c05f872ac26322464e3995> (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-5318](https://www.cve.org/CVERecord?id=CVE-2026-5318), CVE Terms of Use, modified 2026-04-07
- NVD: [CVE-2026-5318](https://nvd.nist.gov/vuln/detail/CVE-2026-5318), Public domain, modified 2026-06-17

---

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