cve.bz

CVE-2024-7884 dfinity canister developer kit for the internet computer

7.5 highEPSS 0.7%Fix available

High (7.5) in dfinity canister developer kit for the internet computer. EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in ic_cdk 0.10.1, 0.11.6, 0.12.2.

On this page
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.

Severity

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
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 54th percentile. Scored 2026-11-24. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2024-09-05. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-401 Missing Release of Memory after Effective Lifetime
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

  • ic_cdk (crates.io): 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
  • ic-cdk (crates.io): 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
  • Internet Computer ic-cdk: fixed in 0.8.2
  • Internet Computer ic-cdk: fixed in 0.9.3
  • Internet Computer ic-cdk: fixed in 0.10.1
  • Internet Computer ic-cdk: fixed in 0.11.6
  • Internet Computer ic-cdk: fixed in 0.12.2
  • Internet Computer ic-cdk: fixed in 0.13.5
  • Internet Computer ic-cdk: fixed in 0.14.1
  • Internet Computer ic-cdk: fixed in 0.15.1
  • Patch: https://github.com/dfinity/cdk-rs/pull/509

Ask an AI about this CVE

Show the promptExplain CVE-2024-7884 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-7884?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-7884?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-7884 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Internet Computer ic-cdkfrom 0.8.0 before 0.8.2
Internet Computer ic-cdkfrom 0.9.0 before 0.9.3
Internet Computer ic-cdkfrom 0.10.0 before 0.10.1
Internet Computer ic-cdkfrom 0.11.0 before 0.11.5
Internet Computer ic-cdkfrom 0.12.0 before 0.12.2
Internet Computer ic-cdkfrom 0.13.0 before 0.13.4
Internet Computer ic-cdkfrom 0.14.0 before 0.14.1
Internet Computer ic-cdkfrom 0.15.0 before 0.15.1

Fixed in

ProductFixed in
Internet Computer ic-cdk0.8.2
Internet Computer ic-cdk0.9.3
Internet Computer ic-cdk0.10.1
Internet Computer ic-cdk0.11.6
Internet Computer ic-cdk0.12.2
Internet Computer ic-cdk0.13.5
Internet Computer ic-cdk0.14.1
Internet Computer ic-cdk0.15.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.8.0 <0.8.20.8.2
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.9.0 <0.9.30.9.3
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.10.0 <0.10.10.10.1
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.11.0 <0.11.60.11.6
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.12.0 <0.12.20.12.2
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.13.0 <0.13.50.13.5
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.14.0 <0.14.10.14.1
GHSA-rwq6-crjg-9cpwcrates.ioic_cdk>=0.15.0 <0.15.10.15.1
RUSTSEC-2024-0372crates.ioic-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
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

References

Check your stackJSON