CVE-2023-6245
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in. High risk of service disruption.
- Exploit odds
- 1.2% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 1.2% in the next 30 days (EPSS).
- Severity: 7.5 HIGH (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.2% · EPSS, next 30 days
- Weakness
- CWE-20 · Improper input validation
- Record status
- Modified
Affected
- Dfinity Candid < 0.9.10
Attack profile CVSS 3.1 · 7.5
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2023-6245.md and follow it. Check whether this project is affected by CVE-2023-6245. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/dfinity/candid/pull/478
- https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j
- https://github.com/dfinity/candid/pull/478
- https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j
References
- https://github.com/dfinity/candid/blob/master/spec/Candid.md
- https://github.com/dfinity/candid/pull/478
- https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j
- https://internetcomputer.org/docs/current/references/candid-ref
- https://internetcomputer.org/docs/current/references/ic-interface-spec
- https://github.com/dfinity/candid/blob/master/spec/Candid.md
- https://github.com/dfinity/candid/pull/478
- https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j
- https://internetcomputer.org/docs/current/references/candid-ref
- https://internetcomputer.org/docs/current/references/ic-interface-spec