# CVE-2023-6245: Infinite decoding loop through specially crafted payload

- Severity: High 7.5 (CVSS:3.1, scored by Dfinity) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.21%, higher than 69% of CVEs (2026-12-01)
- Published: 2023-12-08T12:00:00.000Z
- Modified: 2026-06-17T06:50:23.063Z
- Also known as: GHSA-7787-p7x6-fq3j, RUSTSEC-2023-0073
- Weaknesses: CWE-20, CWE-168, CWE-400, CWE-835, CWE-1288
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Dfinity

## Description

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.

(As written by CVE List.)

## Affected

- Internet Computer Candid: from 0.9.0 before 0.9.10
- candid (crates.io): from 0.9.0 before 0.9.10
- dfinity candid: from 0.9.0 before 0.9.10

## Every score

- Dfinity: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- RustSec Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/dfinity/candid/pull/478> (patch, web)
- <https://internetcomputer.org/docs/current/references/candid-ref> (product, web)
- <https://github.com/dfinity/candid/blob/master/spec/Candid.md> (product, web)
- <https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j> (patch, third-party-advisory, web)
- <https://internetcomputer.org/docs/current/references/ic-interface-spec> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-6245> (advisory)
- <https://github.com/dfinity/candid/commit/b233dbc2d2bcc79c9fc574dd5968269df680b073> (web)
- <https://github.com/dfinity/candid> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0073.html> (advisory, web)
- <https://crates.io/crates/candid> (package)

## Sources

- CVE List: [CVE-2023-6245](https://www.cve.org/CVERecord?id=CVE-2023-6245), CVE Terms of Use, modified 2024-12-02
- GitHub Advisory Database: [GHSA-7787-p7x6-fq3j](https://github.com/advisories/GHSA-7787-p7x6-fq3j), CC-BY-4.0, modified 2026-05-04
- RustSec Advisory Database: [RUSTSEC-2023-0073](https://rustsec.org/advisories/RUSTSEC-2023-0073.html), CC0-1.0, modified 2023-12-09
- NVD: [CVE-2023-6245](https://nvd.nist.gov/vuln/detail/CVE-2023-6245), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-6245 · Whole record: https://cve.day/CVE-2023-6245.json · Rebuilt by cve.day 2026-11-25T22:58:31.151Z
