CVE-2026-120252
imagecodecs 2023.1.23 through 2026.10.10 Stack Buffer Overflow via jpegsof3_decode()
What happened?
imagecodecs 2023.1.23 through 2026.10.10 contains a stack-based buffer overflow vulnerability in the lossless JPEG Define Huffman Table parser in decode_jpegsof3(). Attackers can supply a crafted lossless JPEG whose DHT symbol counts wrap an 8-bit sum, overflowing the 32-entry HufVal and HufSz stack arrays and crashing the calling process.
Affected software and versions
| Software | Version information | Fixed version |
|---|---|---|
| imagecodecscgohlke | affected: 2023.1.23 to ≤ 2026.10.10 | See vendor advisory |
Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.
Is it being exploited?
This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.
How to respond
- Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
- Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
- Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.
Sources and remediation references
- https://www.cve.org/CVERecord?id=CVE-2026-120252
- https://github.com/cgohlke/imagecodecs/issues/157
- https://github.com/cgohlke/imagecodecs/blob/v2026.10.10/3rdparty/jpegsof3/jpegsof3.cpp#L394
- https://github.com/cgohlke/imagecodecs
- https://www.vulncheck.com/advisories/imagecodecs-2023.1.23-through-2026.10.10-stack-buffer-overflow-via-jpegsof3-decode