The vulnerability lies in the recursive nature of the serialization and deserialization processes in the seroval library. When handling deeply nested objects, the recursive function calls could exceed the maximum call stack size, leading to a Denial of Service. The patch addresses this by introducing a depthLimit in the options for both serialization and deserialization. The core recursive functions (parseSOS, parseAsync, and deserialize) were modified to track the current recursion depth and throw an error if the limit is exceeded. The evidence is clear in the diffs for packages/seroval/src/core/context/sync-parser.ts, packages/seroval/src/core/context/async-parser.ts, and packages/seroval/src/core/context/deserializer.ts, where a depth parameter is added to the main recursive functions and a check against depthLimit is performed at the beginning of each call.