ic-stable-structures vulnerable to BTreeMap memory leak when deallocating nodes with overflows
CVE-2024-4435GHSA-3rcq-39xp-7xjp
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (ic-stable-structures 0.6.4), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
crates.io ic-stable-structures
- Affected
- >= 0.6.0, < 0.6.4
- Fixed in
- 0.6.4
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-3rcq-39xp-7xjp lists affected ranges: crates.io ic-stable-structures >=0.6.0 <0.6.4
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 5.9 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2024-4435: 0.52% estimated exploitation activity in the next 30 days; percentile 43.95 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Impact When storing unbounded types in a BTreeMap, a node is represented as a linked list of "memory chunks". It was discovered recently that when we deallocate a node, in some cases only the first memory chunk is deallocated, and the rest of the memory chunks remain (incorrectly) allocated, causing a memory leak. In the worst case, depending on how a canister uses the BTreeMap, an adversary could interact with the canister through its API and trigger interactions with the map that keep consuming memory due to the memory leak. This could potentially lead to using an excessive amount of memory, or even running out of memory. This issue has been fixed in #212 by changing the logic for deallocating nodes to ensure that all of a node's memory chunks are deallocated. Tests have been added to prevent regressions of this nature moving forward. Note: Users of stable-structure < 0.6.0 are not affected. Patches The problem has been fixed in PR #212 and users are asked to upgrade to version…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-3rcq-39xp-7xjp
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2024-4435 Advisory: ic-stable-structures vulnerable to BTreeMap memory leak when deallocating nodes with overflows IDs: CVE-2024-4435, GHSA-3rcq-39xp-7xjp Record: https://patchnext.com/advisories/cve-2024-4435 (revision 1, source checked 26 Oct 2026, 15:39 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 5.9) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: ic-stable-structures 0.6.4. A vendor fix does not mean a deployment is fixed. ## Affected components - crates.io ic-stable-structures: affected >= 0.6.0, < 0.6.4; fixed in 0.6.4 ## Suggested inspection (read-only) - crates.io ic-stable-structures: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on ic-stable-structures. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-3rcq-39xp-7xjp (GitHub-reviewed advisory GHSA-3rcq-39xp-7xjp lists affected ranges: crates.io ic-stable-structures >=0.6.0 <0.6.4) Commands are suggestions: review each one before running it.
Loading voting…