---
id: CVE-2021-45699
aliases:
  - RUSTSEC-2021-0108
  - GHSA-2969-8hh9-57jc
  - GHSA-48vq-8jqv-gm6f
title: Remote memory exhaustion in ckb
summary: Remote memory exhaustion in ckb
severity: none
vendor: ckb
product: ckb
ecosystem: rust
affected:
  - 'ckb >= 0.0.0-0, < 0.40.0'
patched:
  - ckb 0.40.0
published: '2021-07-25'
updated: '2026-10-12'
sourceUpdated: '2026-10-12T18:00:05.111824805Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/RUSTSEC-2021-0108'
references:
  - url: 'https://crates.io/crates/ckb'
  - url: 'https://rustsec.org/advisories/RUSTSEC-2021-0108.html'
tags:
  - osv
  - rust
epss: 0.01515
epssPercentile: 0.7437
ingestedAt: '2026-10-13T11:45:30.152Z'
---

## Overview

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.

## Affected packages

- `ckb >= 0.0.0-0, < 0.40.0`

## Remediation

Upgrade to a patched release:

- `ckb 0.40.0`
