Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft QR image with degenerate finder patterns
-
DeliverySubmit image to app decoding with quirc
-
ExploitTrigger billions of region_code() iterations in find_alignment_pattern()
-
ExecutionExhaust CPU and hang quirc_end()
-
ImpactDenial of service on decoder
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Excessive iteration
|
| Exploitation Conditions | Exploitation requires the target application to pass an attacker-controlled QR image through quirc's decode path (quirc_end() calling find_alignment_pattern()); the malicious image must specifically arrange three finder patterns that produce a near-degenerate (near-zero denominator) perspective transform, inflating size_estimate so the spiral search runs for billions of iterations. The CVSS vector (UI:P) indicates passive user interaction - the crafted image must be ingested/decoded rather than exploitation occurring autonomously - which limits opportunistic mass exploitation unless the host app automatically decodes untrusted uploaded images. There is no authentication requirement (PR:N), and only versions of quirc through 1.2 (prior to the PR #159 fix) are affected; applications not invoking quirc on untrusted images are not exposed. |
| Impact | This is a denial-of-service (availability-only) vulnerability, confirmed by both the CWE-834 (Uncontrolled Iteration/Loop) classification and the CVSS 4.0 vector (VC:N/VI:N/VA:H), which shows no confidentiality or integrity impact. The vendor-supplied CVSS 4.0 score of 6.8 (Medium) is driven by AV:L (local), AC:L, PR:N, UI:P (passive user interaction), and high availability impact. No EPSS score, CISA KEV listing, or confirmed working exploit was provided in the input, so there is no evidence of active exploitation; the risk is real but bounded. The practical severity depends heavily on context: the CVSS marks the vector as Local with required user interaction, implying the crafted QR image must be fed to the decoder (e.g. a user opens or scans an image), yet the description's phrase 'applications decoding attacker-supplied QR images' means that any service which auto-ingests remote/untrusted images (upload endpoints, scanners, pipelines) effectively faces a remotely-triggerable CPU-exhaustion condition - a mismatch worth verifying against each deployment. Because quirc is an embedded library rather than a standalone service, blast radius is determined by the host application. Overall this is a legitimate hardening priority for anyone decoding untrusted QR images, but it is a resource-exhaustion DoS, not a code-execution or data-exposure flaw, so it should be prioritized below RCE/info-leak issues of comparable score. |
| Exploit ScenarioDerived | An attacker crafts a QR-code image whose three finder patterns yield a near-degenerate perspective transform, then delivers it to an application that uses quirc to decode user-supplied images (e.g. an image-upload or document-scanning endpoint). When the application calls quirc_end(), find_alignment_pattern() spins for hundreds of millions to billions of region_code() iterations, pinning a CPU core and hanging the decode thread. A detailed technical write-up describing the spiral-search infinite loop is publicly available (hackmd/VulnCheck advisory), though no packaged exploit code was indicated in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Denial of service in the quirc QR-code decoding library (versions through 1.2) allows an attacker who supplies a crafted QR image to hang the decoder in quirc_end(), pinning a CPU core for an effectively unbounded time. The excessive-iteration flaw lives in find_alignment_pattern() in lib/identify.c: a slide of three finder patterns can produce a near-degenerate perspective transform whose near-zero denominator inflates size_estimate, driving the alignment-pattern spiral through billions of region_code() iterations on a tiny image. Impact is availability-only (CVSS 4.0 VC:N/VI:N/VA:H; assessed CVSS 3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H): no authentication is required, but exploitation needs the host application to actually decode attacker-controlled image data (UI:P / UI:R passive interaction), so exposure is limited to services or apps that automatically run quirc over untrusted uploads; no public exploit was identified at time of analysis, though a public technical writeup of the loop condition exists and an upstream fix has been published as PR #159.
RemediationAI
Apply the upstream fix in PR #159 (https://github.com/dlbeer/quirc/pull/159): it caps the alignment-pattern spiral radius by computing max_step as the larger image dimension plus one and adding 'step_size <= max_step' to the loop condition, and it guards the memcpy in quirc_resize() against a zero-length copy. Note this is an upstream fix available via PR/commit - a released patched version number is not independently confirmed in the available data, so verify the commit is included in whatever release or vendored copy you ship. If you cannot patch immediately, apply compensating controls with awareness of their trade-offs: run QR decoding in an isolated child process or worker with a hard CPU/time limit and kill it on timeout (containment rather than a fix - legitimate large or noisy images may be killed too, so size the limit against your real workload); enforce strict maximum image width/height and pixel-count limits before calling quirc_resize()/quirc_end() (this narrows the attack surface since the loop is driven by an inflated size_estimate, but does not eliminate the near-degenerate-transform case); reject or quarantine untrusted uploads that do not decode within a normal budget and disable automatic QR decoding of user-supplied images (removes exposure but breaks zero-touch scanning workflows); and prefer decoding only via trusted, size-constrained channels. Additional references: https://github.com/dlbeer/quirc/issues/162, https://hackmd.io/@haind-pwn/quirc-alignment-pattern-infinite-loop-dos, and the VulnCheck advisory at https://www.vulncheck.com/advisories/quirc-through-1.2-denial-of-service-via-find-alignment-pattern-spiral-search.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
quirc is a small C library for extracting and decoding QR codes, widely embedded in kiosk software, document scanners, mobile/desktop apps, and server-side image pipelines. CWE-834 (Excessive Iteration / Uncontrolled Loop Iteration) is the root-cause class: the alignment-pattern locator in lib/identify.c (around lines 578-636) performs a spiral outward search whose loop condition is 'while (step_size * step_size < size_estimate * 100)', i.e. the iteration count is derived from size_estimate rather than from any bound tied to the image itself. An attacker can craft an image in which the three detected finder patterns define a degenerate perspective transform; the near-zero denominator of that transform makes size_estimate enormous, so the spiral keeps calling region_code() and scanning far outside the actual pixel buffer for hundreds of millions to billions of iterations, consuming CPU until the process is killed or times out. The upstream patch (PR #159) addresses this by computing max_step from the image dimensions and adding 'step_size <= max_step' to the loop guard (the alignment pattern cannot lie outside the image, so the search radius is safely capped), and also hardens quirc_resize() by only performing memcpy when the computed length is greater than zero. Affected CPE: cpe:2.3:a:dlbeer:quirc:*:*:*:*:*:*:*:* - all releases through 1.2 prior to the PR #159 fix.
Know when Quirc gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Availability-only CPU-exhaustion DoS (C:N/I:N/A:H); AV:L with UI:R because a crafted image must be supplied to and decoded by the host application, no authentication (PR:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
quirc through 1.2 contains an excessive-iteration vulnerability in find_alignment_pattern() in lib/identify.c that allows attackers to hang quirc_end() with a crafted image. Attackers can arrange three finder patterns producing a near-degenerate perspective transform, causing billions of region_code() iterations that exhaust CPU in applications decoding attacker-supplied QR images.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-101224
GHSA-fjm5-xm8f-3gjj
NVD
CVE.org
EPSS
VulDB
Exploit-DB