CVE-2023-6245
High · 7.5CVSS
7.5
EPSS
1.2%
Published
Dec 8, 2023
CISA due date
—
Cloudanix analysis
A coding library used by certain decentralized applications can be tricked into freezing when it receives specially formatted data, causing those applications to slow down or stop responding.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The candid Rust decoder misclassifies the 'empty' type as a recoverable error when skipping an unexpected field in a record payload, resulting in an infinite decoding loop that consumes the instruction limit and traps the canister.
Why it matters to the business
Canisters experience repeated denial of service, leading to degraded availability, performance impact, and potential operational disruption for services relying on the affected library; the issue has been public for over two years with no change in exploit likelihood.
How an attack unfolds
An attacker crafts a record payload containing an 'empty' field that the target canister interface does not expect, submits it via the canister's ingress interface, and triggers the infinite loop in the candid decoder until the instruction limit is reached; repeated submissions sustain the degradation.
How to fix it
Upgrade the candid dependency to a patched release once available; in the interim implement strict input validation or schema enforcement at the canister boundary to reject unexpected record fields before decoding.
How to confirm the fix worked
Test the canister with both the malicious record { * ; empty } payload and a benign record to confirm the loop no longer occurs; verify the candid crate version in Cargo.lock and re-run unit tests that exercise record decoding.
Typical attack path
- Identify a canister whose interface declares a record type without the 'empty' variant
- Construct a malicious payload using the record { * ; empty } pattern
- Submit the payload through the canister's public entry point or query method
- Observe the decoder enter an infinite loop consuming the round's instruction budget
- Repeat submissions to maintain degraded performance
How to detect it
Review canister execution logs for repeated instruction-limit traps during decoding operations; correlate spikes in failed or long-running ingress messages with payloads containing unexpected record fields.
What your security team should do
- Prioritize upgrade of the candid dependency as soon as a fixed version is released
- Add defensive schema checks or custom deserialization guards around record decoding
- Monitor canister instruction consumption metrics for anomalous spikes
- Restrict or rate-limit untrusted ingress traffic to affected entry points until patched
The record
The Candid library causes a Denial of Service while parsing a specially crafted payload with 'empty' data type. For example, if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type. The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop. Canisters using affected versions of candid are exposed to denial of service by causing the decoding to run indefinitely until the canister traps due to reaching maximum instruction limit per execution round. Repeated exposure to the payload will result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | candid | 0.9.0 | 0.9.10 |
| Ubuntu:18.04:LTS | candid | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | candid | 0 | No fix |
| cargo | candid | 0.9.0 | 0.9.10 |
Related vulnerabilities
- CVE-2026-110354 HAProxy 3 before 3.4.6 allows a remote unauthenticated attacker to cause a denial of… CWE-835
- CVE-2026-113794 pypdf is a free and open-source pure-python PDF library. CWE-835
- CVE-2026-113792 pypdf is a free and open-source pure-python PDF library. CWE-835
- CVE-2026-113793 pypdf is a free and open-source pure-python PDF library. CWE-835
- CVE-2026-112406 Pillow is a Python imaging library. CWE-835
- CVE-2026-112391 Pillow is a Python imaging library. CWE-835
- CVE-2026-112390 Pillow is a Python imaging library. CWE-835
- CVE-2026-101895 Angular is a development platform for building mobile and desktop web applications using… CWE-835