The issue is related to a lack of unwind safety in `stream callback` and `stream finished callback` functions, leading to a use-after-free condition that allows for arbitrary code execution. This occurs because the call to a user-provided closure might panic before a `mem::forget` call, causing a use-after-free that grants an attacker control over the callback function pointer. The flaw was reported by Phosphorus15.