{"id":"GHSA-j35p-q24r-5367","aliases":[],"status":"published","title":"Dep Group Remote Memory Exhaustion (Denial of Service) in ckb","description":"### Impact\nA remote attacker could exploit this vulnerability to exhaust ckb process memory of an affected node.\n\n### Patches\nUpgrade to 0.43.1 or later.\n\n### References\nAfter resolving the outpoints of one dep group, we put the corresponding content into a vec ( https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617 ), there is a vulnerability to a memory dos attack because there is no determination of whether the outpoints is duplicated.\n\nPoC:\n```\nbefore send dos tx rss:\n105700\n\nafter rss:\n2306932\n```\n\nDoS cost: 25.6 KB * 150 + dep_tx out_points capacity ( 36 * 150 * 100 = 540000 ) = 4380000 CKB\nSend 50 dos_tx, memory exhausted: (25.6 KB * 150  * 100) * 50 = 19.2 GB","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2022-04-22T20:23:04Z","modified":"2023-01-11T05:07:14Z","fixes":[{"ecosystem":"crates.io","package":"ckb","fixed_in":["0.43.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"ckb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.43.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"ckb","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.43.1"}]}]}],"references":[{"url":"https://github.com/nervosnetwork/ckb/security/advisories/GHSA-j35p-q24r-5367","tags":["web"]},{"url":"https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617","tags":["web"]},{"url":"https://github.com/advisories/GHSA-j35p-q24r-5367"},{"url":"https://github.com/nervosnetwork/ckb","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-j35p-q24r-5367","title":"Dep Group Remote Memory Exhaustion (Denial of Service) in ckb","description":"### Impact\nA remote attacker could exploit this vulnerability to exhaust ckb process memory of an affected node.\n\n### Patches\nUpgrade to 0.43.1 or later.\n\n### References\nAfter resolving the outpoints of one dep group, we put the corresponding content into a vec ( https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617 ), there is a vulnerability to a memory dos attack because there is no determination of whether the outpoints is duplicated.\n\nPoC:\n```\nbefore send dos tx rss:\n105700\n\nafter rss:\n2306932\n```\n\nDoS cost: 25.6 KB * 150 + dep_tx out_points capacity ( 36 * 150 * 100 = 540000 ) = 4380000 CKB\nSend 50 dos_tx, memory exhausted: (25.6 KB * 150  * 100) * 50 = 19.2 GB\n\n","status":"published","published":"2022-04-22T20:23:04Z","modified":"2023-01-11T05:07:14Z","updated_at":"2026-11-02T14:36:13.23016Z"}],"osv":[{"id":"GHSA-j35p-q24r-5367","title":"Dep Group Remote Memory Exhaustion (Denial of Service) in ckb","description":"### Impact\nA remote attacker could exploit this vulnerability to exhaust ckb process memory of an affected node.\n\n### Patches\nUpgrade to 0.43.1 or later.\n\n### References\nAfter resolving the outpoints of one dep group, we put the corresponding content into a vec ( https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617 ), there is a vulnerability to a memory dos attack because there is no determination of whether the outpoints is duplicated.\n\nPoC:\n```\nbefore send dos tx rss:\n105700\n\nafter rss:\n2306932\n```\n\nDoS cost: 25.6 KB * 150 + dep_tx out_points capacity ( 36 * 150 * 100 = 540000 ) = 4380000 CKB\nSend 50 dos_tx, memory exhausted: (25.6 KB * 150  * 100) * 50 = 19.2 GB\n\n","status":"published","published":"2022-04-22T20:23:04Z","modified":"2022-04-22T20:23:04Z","updated_at":"2026-11-02T15:46:49.977351Z"}]}}
