The vulnerability lies in the deserialization process of the seroval library, where it improperly trusts serialized length/size values for various data structures. An attacker can craft a serialized payload with an artificially large length value for an Array, Set, Map, or Object properties record, while providing only a small amount of actual data. When the library's deserialization functions (such as deserializeArray, deserializeSet, deserializeMap, and deserializeProperties) process this payload, they use the trusted large length value to control their processing loops. This leads to an excessive number of iterations, consuming significant CPU resources and blocking the Node.js event loop, resulting in a Denial of Service. The patch addresses this by removing the reliance on the serialized length and instead deriving the length directly from the count of the deserialized items, ensuring the loops only iterate over the data that is actually present.