CVE-2021-45698
Description
An issue was discovered in the ckb crate before 0.40.0 for Rust. A get_block_template RPC call may fail in situations where it is supposed to select a Nervos CKB blockchain transaction with a higher fee rate than another transaction.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The ckb crate before 0.40.0 for Rust has a bug in get_block_template RPC that fails when selecting transactions, causing miners to be unable to produce blocks under specific conditions.
Vulnerability
An issue in the ckb crate before version 0.40.0 for Rust causes the get_block_template RPC call to fail when a cell is used as a cell dep in one transaction and destroyed as an input in another transaction ([2], [4]). The failure occurs specifically when the transaction destroying the cell has a higher fee rate than the transaction using it as a dep. Affected versions: all prior to 0.40.0.
Exploitation
An attacker can trigger this vulnerability by submitting two conflicting transactions to the node's transaction pool: transaction A that uses a cell C as a cell dep, and transaction B that destroys cell C as an input. If transaction B has a higher fee rate than A, the node, when generating a block template, will attempt to include B before A, causing the RPC to fail instead of dropping A ([2], [4]). The attacker only needs the ability to submit transactions to the pool; no special network position or authentication is required beyond that of a normal user.
Impact
Successful exploitation results in a denial of service for miners attempting to create block templates. The get_block_template RPC fails repeatedly, potentially stalling block production until the conflicting transactions are resolved or removed from the pool. No data disclosure, code execution, or privilege escalation occurs.
Mitigation
The vulnerability is fixed in ckb version 0.40.0, released on July 25, 2021 ([2], [4]). Users should upgrade to 0.40.0 or later. Workarounds include ensuring that the transaction destroying a cell dep has a lower fee rate than the dependent transaction, or explicitly making the destroying transaction depend on an output of the dependent transaction by using it as a dep cell or input. Merging both transactions into one is also effective, as CKB allows using the same cell as both dep and input in the same transaction ([4]).
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ckbcrates.io | < 0.40.0 | 0.40.0 |
Affected products
2- ckb/ckbdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-8gjm-h3xj-mp6wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-45698ghsaADVISORY
- github.com/nervosnetwork/ckb/security/advisories/GHSA-v666-6w97-pcwmghsaWEB
- raw.githubusercontent.com/rustsec/advisory-db/main/crates/ckb/RUSTSEC-2021-0107.mdghsax_refsource_MISCWEB
- rustsec.org/advisories/RUSTSEC-2021-0107.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.