CVE-2026-123367: ThorVG: Heap buffer overflow (OOB write) in bundled jpgd JPEG decoder
Thor Vector Graphics (ThorVG) is a production-ready vector graphics engine. Prior to 1.1.2, the bundled jpgd JPEG decoder accepts duplicate component selectors in an SOS scan header, causing each duplicate to increase mblockspermcu without checking the buffers sized from the frame components. A crafted grayscale JPEG can repeat its component in the SOS header, causing decode paths in src/loaders/jpg/tvgJpgd.cpp to write beyond heap buffers sized for one component. The issue is reachable through direct JPEG decoding and through JPEG images embedded in Lottie content, and confirmed impact is memory corruption followed by a process crash. This issue is fixed in version 1.1.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ThorVGto a version that resolves this vulnerability.Fixed in 1.1.2
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using ThorVG versions before 1.1.2 are exposed when they decode attacker-controlled JPEG files directly or process Lottie content that contains embedded JPEG images.
What must an attacker provide to trigger the flaw?
The attacker needs to induce decoding of a crafted grayscale JPEG whose SOS scan header repeats the same component selector. The supplied vector indicates network reachability, low attack complexity, no required privileges, and user interaction.
Are default ThorVG deployments affected?
The issue is in ThorVG's bundled jpgd JPEG decoder. Any affected deployment that uses this decoder to process untrusted JPEG input, including embedded JPEGs in Lottie files, should be considered affected.
What is the observed impact of successful exploitation?
The malformed scan header causes heap-buffer writes beyond buffers allocated for a single component. Confirmed impact is memory corruption followed by a process crash.
What should teams do if they cannot immediately upgrade?
Until upgrading to 1.1.2, avoid decoding untrusted JPEG files and untrusted Lottie content containing embedded JPEG images with affected ThorVG versions.