CVE-2024-4435: ic-stable-structures vulnerable to BTreeMap memory leak when deallocating nodes with overflows
Affects ic-stable-structuresSource GCVE Database
Not known to be exploited · CVSS 5.9 Medium : upgrade to 0.6.4 when convenient.
Data as of 29 Nov 2026, 11:47 UTC
- Patch
- Available – fixed in 0.6.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 21 May 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Nov 2026.
What to do
Upgrade ic-stable-structures to 0.6.4.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| crates.ioic-stable-structures | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Users should upgrade to ic-stable-structures version 0.6.4 or later, where the issue is fixed. Users not storing unbounded types in BTreeMap are not affected and do not need to upgrade. No other workarounds are necessary.
Description
A memory leak vulnerability exists in ic-stable-structures versions 0.6.0 up to but not including 0.6.4 when using BTreeMap to store unbounded types. The issue occurs because only the first memory chunk of a node is deallocated, leaving the rest allocated and causing memory consumption to grow. This can lead to excessive memory use or out-of-memory conditions if exploited. The vulnerability has been fixed in version 0.6.4.
References
- github.com/dfinity/stable-structures/security/advisories/GHSA-3rcq-39xp-7xjp (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-4435 (opens in a new tab)
- github.com/dfinity/stable-structures/pull/212 (opens in a new tab)
- github.com/dfinity/stable-structures/commit/4f6b8ae521884833498bae26369c353c10f28ea7 (opens in a new tab)
- docs.rs/ic-stable-structures/0.6.4/ic_stable_structures (opens in a new tab)
- github.com/dfinity/stable-structures (opens in a new tab)
- internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/storage (opens in a new tab)
- rustsec.org/advisories/RUSTSEC-2024-0406.html (opens in a new tab)