CVE-2026-11941: Cloudflare Quiche Use-After-Free in FFI Connection ID Functions
Cloudflare's Quiche QUIC library contains two use-after-free vulnerabilities in its C FFI (Foreign Function Interface) layer. When applications call the quiche_connection_id_iter_next or quiche_conn_retired_scid_next functions, these functions return a pointer to connection ID data that has already been freed from memory. This is a memory safety issue that primarily affects custom applications that directly use Quiche's C bindings—a relatively small subset compared to Rust consumers. The good news is the FFI layer is disabled by default and requires explicit build-time opt-in.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.6 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- Weaknesses (CWE)
- CWE-416
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-19 / 2026-06-22
NVD description (verbatim)
Cloudflare Quiche was affected by 2 use-after-free vulnerabilities in the connection ID iterator FFI functions. The “quiche_connection_id_iter_next” and “quiche_conn_retired_scid_next” functions would return a pointer to a “ConnectionId” to the applications via function arguments, but the owned “ConnectionId” would be dropped at the end of those functions' scope. Only applications using those FFI functions are affected. The FFI API is disabled by default by a build-time feature flag. Impact If unpatched, an application calling the affected FFI functions will dereference freed memory. The most likely outcome is undefined behavior leading to a process crash (denial of service). Depending on allocator state, the read may also return adjacent heap contents, resulting in limited information disclosure or incorrect connection identifier handling. Mitigation Users are requested to upgrade to quiche 0.29.2 which is the earliest version containing the fix for this issue.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from improper memory lifetime management in two FFI wrapper functions. Both quiche_connection_id_iter_next and quiche_conn_retired_scid_next allocate or reference a ConnectionId object, return a pointer to it via function arguments, then drop (deallocate) that object when the function returns. Callers receive a dangling pointer into freed heap memory. This violates Rust's memory safety guarantees at the language boundary. The root cause is a mismatch between the caller's expectation (that the returned pointer remains valid) and the actual lifetime of the underlying object. CWE-416 (Use After Free) is the appropriate classification.
Business impact
Applications leveraging the FFI interface for connection ID iteration face runtime instability. The most probable outcome is process crashes triggered by dereference of invalid memory, creating a denial-of-service condition. In some scenarios—depending on heap allocator behavior and timing—the freed memory may be reused, allowing reads of adjacent heap structures. This could leak sensitive data like other connection IDs, session tokens, or protocol state. For production systems relying on affected FFI functions, availability and confidentiality are both at risk. Organizations must inventory which internal or third-party applications consume Quiche's C API.
Affected systems
Any application or library that explicitly enables Quiche's FFI feature (via build-time configuration) and calls either quiche_connection_id_iter_next or quiche_conn_retired_scid_next is vulnerable. The Rust API and most standard Quiche deployments are unaffected because the FFI layer is opt-in and disabled by default. The scope is narrower than the upstream project itself—it applies only to applications bridging from C/C++ into Quiche or to language bindings that wrap these specific functions.
Exploitability
Exploitation is not straightforward. An attacker cannot directly trigger the use-after-free from the network; they would need to influence when and how an application calls the vulnerable FFI functions. The vulnerability requires either (1) a bug in application code that consistently dereferences the returned pointer, or (2) heap state conditions that cause adjacent memory to contain exploitable data. CVSS rates this as MEDIUM (5.6) with MEDIUM complexity, reflecting that while the underlying flaw is serious, practical exploitation paths are limited by the application's control flow and the attacker's ability to influence heap state. This is not a network-facing remote code execution vector in isolation.
Remediation
Upgrade Quiche to version 0.29.2 or later. This is the earliest version containing the fix. Applications should verify their dependency configuration and ensure the FFI feature is only enabled if genuinely required; disabling it at build time eliminates the risk entirely. Review any custom C or C++ code that calls the affected functions and test thoroughly after patching to confirm the use-after-free is resolved.
Patch guidance
For projects using Quiche as a dependency, update your Cargo.toml or equivalent package manifest to require quiche >= 0.29.2. If Quiche is vendored or built in-tree, rebuild from the patched source. Prioritize this for any application or service that explicitly enables the FFI feature. Verify the patch by confirming the version in your build output and running integration tests that exercise connection ID iteration. If you are unsure whether your build includes the FFI layer, check your build configuration for the quiche 'ffi' feature flag and disable it unless absolutely necessary.
Detection guidance
Monitor application logs and crash reports for use-after-free errors, segmentation faults, or memory corruption warnings when connection ID iteration occurs. Fuzzing or stress testing connection ID handling may surface the issue before production impact. Code review should focus on any FFI call sites; look for patterns where returned pointers are stored and used beyond the function call. Memory sanitizers (ASan, MSan) will catch these violations if the application is compiled with instrumentation. For deployed systems, runtime monitoring of process crashes correlated with QUIC connection lifecycle events may indicate unexploited but present vulnerabilities.
Why prioritize this
While rated MEDIUM severity, this vulnerability affects a specific subset of applications and requires intentional FFI opt-in, reducing broad exposure. However, for affected systems it is high-impact: use-after-free is a reliable DoS vector and can leak memory contents. The fix is straightforward (upgrade Quiche), so prioritization should hinge on inventory: applications using the Quiche FFI are high-priority; those using only the Rust API can be deprioritized. The lack of KEV (Known Exploited Vulnerability) status suggests this remains largely theoretical, but the flaw is clear and straightforward to trigger in vulnerable code.
Risk score, explained
CVSS 5.6 MEDIUM reflects a use-after-free with limited scope (FFI-only, opt-in), moderate confidentiality and integrity impact (information disclosure, incorrect behavior), and denial of service potential. The AV:N (network-accessible) component is somewhat generous—while Quiche processes network packets, triggering the vulnerability requires application-level control flow, hence the high AC (attack complexity). The lack of privilege requirement (PR:N) and user interaction (UI:N) acknowledges that the flaw is in library code, not a privilege boundary. Integrity and confidentiality are rated Low (L) because the impact depends on heap state and attacker influence. Availability impact is Low to Medium due to crash likelihood.
Frequently asked questions
Does this affect all Quiche users?
No. The vulnerability is specific to applications that explicitly enable Quiche's FFI (C Foreign Function Interface) feature at build time. Most Quiche users consume the Rust API, which is unaffected. FFI is disabled by default.
Can an attacker exploit this remotely over the network?
Not directly. The vulnerability requires an application to call one of the two vulnerable FFI functions and dereference the returned pointer. An attacker would need to influence the application's control flow or heap state, which is difficult without prior knowledge of the application logic. The primary risk is accidental use-after-free in poorly written application code.
What is the real-world impact if we hit this bug?
The most likely outcome is a process crash (denial of service). Depending on timing and allocator behavior, the freed memory may be reused, potentially exposing adjacent heap contents such as other connection IDs or protocol state. Information disclosure is possible but not guaranteed.
How do I know if my application is affected?
Check your build configuration for the 'ffi' feature flag in your Quiche dependency. If it is not explicitly enabled, you are not affected. If you maintain C/C++ code that calls quiche_connection_id_iter_next or quiche_conn_retired_scid_next, your application is affected and should be upgraded to Quiche 0.29.2 immediately.
This analysis is based on vendor advisories and public disclosure as of the date published. Exploit code has not been publicly released at the time of writing. Organizations should verify patch availability and compatibility with their specific Quiche version and deployment before upgrading. SEC.co does not provide exploit code or detailed weaponization guidance. For the latest information, consult the official Cloudflare Quiche repository and security advisories. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-55644MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability
- CVE-2025-55650MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability
- CVE-2025-60486MEDIUMHeap Use-After-Free in GPAC MP4Box MPEG-2 Dasher – DoS Vulnerability
- CVE-2026-10232MEDIUMAssimp Use-After-Free in ASE Parser (CVSS 5.3)
- CVE-2026-10634MEDIUMZephyr TCP Stack Use-After-Free Race Condition
- CVE-2026-10635MEDIUMXtensa Memory Domain Use-After-Free in Zephyr RTOS
- CVE-2026-10637MEDIUMZephyr IPv6 MLD Use-After-Free Denial of Service
- CVE-2026-10638MEDIUMZephyr ICMPv6 Use-After-Free Denial of Service