CVE-2026-121942 Details
Description
ZBar through 0.23.95 contains an out-of-bounds read vulnerability in _zbar_sq_decode() in zbar/sqcode.c that allows attackers to read heap memory outside the image buffer via crafted SQ code images. Attackers can supply an image with a skewed SQ code finder pattern near the edge, producing unchecked sample coordinates that crash the decoder and leak bytes into output.
A heap out-of-bounds read vulnerability has been identified in ZBar versions through 0.23.95. The issue resides in the SQ code decoder within the function '_zbar_sq_decode()' in 'zbar/sqcode.c'. This vulnerability allows attackers to read heap memory outside the allocated image buffer by crafting specific SQ code images. The exploitation involves sending an image with a distorted SQ code finder pattern near the edge, which creates unchecked sample coordinates. This not only crashes the decoder but also leaks memory bytes into the output.
To address this vulnerability, ZBar maintainers should clamp the sampling coordinates in the SQ code decoder to ensure they remain within the valid image boundaries. This can be done by checking and adjusting the coordinates before accessing the image data. Additionally, implementing a helper function to encapsulate the bounds checking for pixel sampling could enhance the overall robustness of the decoder.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Nov 4, 2026CISA-ADP
Assessed Nov 4, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://hackmd.io/@haindpwn/cve-2026-121942-zbar-sqcode-sampling-oob-read | CISA-ADP | |
| https://github.com/mchehab/zbar/blob/0.23.95/zbar/sqcode.c#L529-L567 | [email protected] | Source CodeVendor |
| https://github.com/mchehab/zbar/issues/351 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://hackmd.io/@haindpwn/zbar-sqcode-sampling-oob-read | [email protected] | ExploitTechnical Analysis |
| https://www.vulncheck.com/advisories/zbar-through-0.23.95-out-of-bounds-read-via-zbar-sq-decode-in-sqcode-c | [email protected] | AdvisoryBundle |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ZBar | >= 0.23, <= 0.23.95 |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 4, 2026 | CVE Modified | CISA-ADP |
| Nov 4, 2026 | New CVE Received | [email protected] |
Volerion