# CVE-2024-7884: Memory leak when calling a canister method via \`ic\_cdk::call\`

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.31% (percentile 71, 2026-11-26)
- **CWE:** CWE-401
- **Aliases:** GHSA-rwq6-crjg-9cpw, RUSTSEC-2024-0372
- **Published:** 2024-09-05T12:00:00.000Z
- **Modified:** 2026-06-17T08:21:06.737Z

## Who should check

- Projects that depend on crates.io package ic\_cdk (\>= 0.8.0, \< 0.8.2)
- Projects that depend on crates.io package ic-cdk (\>= 0.8.0, \< 0.8.2; \>= 0.9.0-0, \< 0.9.3; \>= 0.10.0-0, \< 0.10.1; \>= 0.11.0-0, \< 0.11.6; \>= 0.12.0-0, \< 0.12.2; \>= 0.13.0-0, \< 0.13.5; \>= 0.14.0-0, \< 0.14.1; \>= 0.15.0-0, \< 0.15.1; \>= 0.16.0-0, \< 0.16.0)
- Anyone running Internet Computer ic-cdk \>= 0.8.0, \< 0.8.2; \>= 0.9.0, \< 0.9.3; \>= 0.10.0, \< 0.10.1; \>= 0.11.0, \< 0.11.5; \>= 0.12.0, \< 0.12.2; \>= 0.13.0, \< 0.13.4; \>= 0.14.0, \< 0.14.1; \>= 0.15.0, \< 0.15.1

## Description

When a canister method is called via ic\_cdk::call\* , a new Future CallFuture is created  and can be awaited by the caller to get the execution result. Internally, the state of the Future is tracked and stored in a struct called CallFutureState.  A bug in the polling implementation of the CallFuture allows multiple references to be held for this internal state and not all references were dropped before the Future is resolved. Since we have unaccounted references held, a copy of the internal state ended up being persisted in the canister's heap and thus causing a memory leak. 
Impact Canisters built in Rust with ic\_cdk and ic\_cdk\_timers are affected. If these canisters call a canister method, use timers or heartbeat, they will likely leak a small amount of memory on every such operation. In the worst case, this could lead to heap memory exhaustion triggered by an attacker. Motoko based canisters are not affected by the bug.
PatchesThe patch has been backported to all minor versions between \>= 0.8.0, \<= 0.15.0. The patched versions available are 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1 and their previous versions have been yanked. WorkaroundsThere are no known workarounds at the moment. Developers are recommended to upgrade their canister as soon as possible to the latest available patched version of ic\_cdk to avoid running out of Wasm heap memory. 
Upgrading the canisters (without updating \`ic\_cdk\`) also frees the leaked memory but it's only a temporary solution.

## Affected and fixed versions

- crates.io `ic_cdk`: affected \>= 0.8.0, \< 0.8.2; fixed 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1 (osv)
- crates.io `ic-cdk`: affected \>= 0.8.0, \< 0.8.2; \>= 0.9.0-0, \< 0.9.3; \>= 0.10.0-0, \< 0.10.1; \>= 0.11.0-0, \< 0.11.6; \>= 0.12.0-0, \< 0.12.2; \>= 0.13.0-0, \< 0.13.5; \>= 0.14.0-0, \< 0.14.1; \>= 0.15.0-0, \< 0.15.1; \>= 0.16.0-0, \< 0.16.0; fixed 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1, 0.16.0 (osv)
- Internet Computer ic-cdk: \>= 0.8.0, \< 0.8.2; \>= 0.9.0, \< 0.9.3; \>= 0.10.0, \< 0.10.1; \>= 0.11.0, \< 0.11.5; \>= 0.12.0, \< 0.12.2; \>= 0.13.0, \< 0.13.4; \>= 0.14.0, \< 0.14.1; \>= 0.15.0, \< 0.15.1 (cvelist)

## Mitigation

- Upgrade ic\_cdk to one of 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1 (or later in the same release line).
- Upgrade ic-cdk to one of 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1, 0.16.0 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-7884. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-7884.md
Affected: ic_cdk >= 0.8.0, < 0.8.2; ic-cdk >= 0.8.0, < 0.8.2; >= 0.9.0-0, < 0.9.3; >= 0.10.0-0, < 0.10.1; >= 0.11.0-0, < 0.11.6; >= 0.12.0-0, < 0.12.2; >= 0.13.0-0, < 0.13.5; >= 0.14.0-0, < 0.14.1; >= 0.15.0-0, < 0.15.1; >= 0.16.0-0, < 0.16.0
Fixed in: 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1, 0.16.0

Steps:
1. Search this machine and project for ic_cdk (crates.io), ic-cdk (crates.io), Internet Computer ic-cdk: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-7884 being exploited?

There is no confirmed exploitation: CVE-2024-7884 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-7884?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-7884?

ic\_cdk \>= 0.8.0, \< 0.8.2; ic-cdk \>= 0.8.0, \< 0.8.2; \>= 0.9.0-0, \< 0.9.3; \>= 0.10.0-0, \< 0.10.1; \>= 0.11.0-0, \< 0.11.6; \>= 0.12.0-0, \< 0.12.2; \>= 0.13.0-0, \< 0.13.5; \>= 0.14.0-0, \< 0.14.1; \>= 0.15.0-0, \< 0.15.1; \>= 0.16.0-0, \< 0.16.0.

### Is there a fix for CVE-2024-7884?

Yes. Fixed in 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1, 0.16.0. Upgrade ic\_cdk to one of 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1 (or later in the same release line). Upgrade ic-cdk to one of 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1, 0.16.0 (or later in the same release line).

### How do I check if I'm affected by CVE-2024-7884?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/dfinity/cdk-rs/security/advisories/GHSA-rwq6-crjg-9cpw>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-7884>
- vendor: <https://rustsec.org/advisories/RUSTSEC-2024-0372.html>
- patch: <https://github.com/dfinity/cdk-rs/pull/509>
- patch: <https://github.com/dfinity/cdk-rs/commit/bd17d57a7b8ca59665fea5fad6143ca02724d03b>
- other: <https://docs.rs/ic-cdk/latest/ic_cdk/>
- other: <https://internetcomputer.org/docs/current/references/ic-interface-spec>
- other: <https://docs.rs/ic-cdk/latest/ic_cdk>
- other: <https://github.com/dfinity/cdk-rs>
- other: <https://crates.io/crates/ic-cdk>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-7884>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-rwq6-crjg-9cpw> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/RUSTSEC-2024-0372> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-7884> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-7884>
