Vulnerability HighRUSTSEC-2021-0108 · ckb
RUSTSEC-2021-0108: Remote memory exhaustion in ckb
Short answerA security vulnerability in the ckb crate: Remote memory exhaustion in ckb. GitHub rates it High. Fixed in 0.40.0: update to a fixed version.
| Crate | ckb |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.40.0. |
| Fixed in | 0.40.0 |
| Severity | High (GitHub rating) |
| Published | 2021-07-25 |
| Last changed | 2026-10-12 |
| Also known as | CVE-2021-45699, GHSA-2969-8hh9-57jc, GHSA-48vq-8jqv-gm6f |
What to do
- See which version you have:
cargo tree -i ckb(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p ckb. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleckb = "0.40.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
In the ckb sync protocol, SyncState maintains a HashMap called 'misbehavior' that keeps a score of a peer's violations of the protocol. This HashMap is keyed to PeerIndex (an alias for SessionId), and entries are never removed from it. SessionId is an integer that increases monotonically with every new connection.
A remote attacker can manipulate this HashMap to grow forever, resulting in degraded performance and ultimately a panic on allocation failure or being killed by the OS, depending on the platform.
This is a critical severity security bug. It could be exploited to create a targeted or network-wide denial of service, to reduce the hash power of the network as part of a 51% attack, and perhaps in other creative ways.
References
- Package: crates.io/crates/ckb
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0108.html
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for ckb
- VulnerabilityRUSTSEC-2021-0107 · 2021-07-25Miner fails to get block template when a cell used as a cell dep has been destroyed.
- VulnerabilityRUSTSEC-2021-0109 · 2021-07-25Process crashes when the cell used as DepGroup is not alive
- VulnerabilityGHSA-29c2-65rj-h343 · 2024-02-03Nervos CKB Permit load cell data from memory
- VulnerabilityGHSA-29c2-65rj-h343 · 2024-02-03Nervos CKB Permit load cell data from memory
- VulnerabilityGHSA-29c2-65rj-h343 · 2024-02-03Nervos CKB Permit load cell data from memory
- VulnerabilityGHSA-29c2-65rj-h343 · 2024-02-03Nervos CKB Permit load cell data from memory
- VulnerabilityGHSA-29c2-65rj-h343 · 2024-02-03Nervos CKB Permit load cell data from memory
- VulnerabilityGHSA-3gjh-29fv-8hr6 · 2024-02-03Nervos CKB Snappy decompress length can be very large and causes out of memory error
Up next
Same crateckb: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?