The vulnerability exists in the Procedure class's deserialization logic. Specifically, when a serialized Procedure object that contains an exception is deserialized, the code reads the exception's class name from the input stream and attempts to instantiate it using reflection (Class.forName() and newInstance()). This constitutes a classic deserialization of untrusted data vulnerability.
An attacker can craft a malicious serialized Procedure object containing a specially chosen class name (a 'gadget' class) in the exception field. When the server deserializes this object, it will load and instantiate the attacker's chosen class, leading to arbitrary code execution on the server.
The patch addresses this by removing the dynamic class loading. Instead of deserializing and instantiating the specific exception class, the patched code now always creates a generic ProcedureException with the deserialized error message. The vulnerable deserializeTypeInfo method, which contained the dangerous Class.forName() call, has been replaced by a deprecated, non-functional version for compatibility purposes, and the deserialize method no longer uses reflection to instantiate exceptions.