The vulnerability lies in the custom serialization and deserialization logic for JavaScript Error objects within a vendored version of the turbo-stream library. The analysis of the patch commit 59811921d3c7d599077b8cadccdcd65a233165e0 reveals the exact weakness.
The stringify function in flatten.ts would serialize an Error object, including its specific name (e.g., 'EvalError'). The hydrate function in unflatten.ts would then deserialize this payload. The critical flaw was in hydrate, where it would use the provided errorType from the serialized data to dynamically look up a constructor on the global object (globalObj[errorType]) and instantiate it.
An attacker could exploit this by sending a crafted payload with a malicious errorType string. When the server deserializes this payload using hydrate, it would attempt to execute new global[attacker_controlled_string](). This could be used to trigger a constructor that consumes excessive resources or causes the application to crash, resulting in a Denial of Service. The patch mitigates this by removing the custom error type handling entirely, always deserializing errors as generic new Error(message), thus preventing the dynamic constructor lookup.