The vulnerability is caused by a combination of two defects. First, the verifyRecord function in packages/kad-dht/src/record/validators.ts does not properly validate record keys, allowing an attacker to craft a key that bypasses validation. Specifically, if the key has fewer than three slash-separated parts, the function returns silently, and the record is stored without any checks. Second, the onIncomingStream function in packages/kad-dht/src/rpc/index.ts contains an unbounded loop for processing incoming messages. The inactivity timeout is reset after each message, which allows an attacker to send an unlimited number of messages over a single stream. By combining these two vulnerabilities, an attacker can send a large number of PUT_VALUE messages with invalid keys, causing the node's datastore to grow indefinitely, leading to disk exhaustion and a denial of service. The handleMessage function is also implicated as it is the function that processes the messages within the vulnerable loop.