The vulnerability is a classic case of unsafe deserialization in PHP. The patch that fixes the vulnerability is in commit 8a682beb0e11865ae600746f44ef5df3d20c52a1, which was included in the patched version v8.1.18. The commit message is 'Use safer deserialization defaults'. The change is in the app/Http/Transformers/ActionlogsTransformer.php file, within the transformActionlog function. The unserialize() calls were modified to include the ['allowed_classes' => false] option. This is a direct mitigation for CVE-2025-59713. The vulnerable function is therefore App\Http\Transformers\ActionlogsTransformer::transformActionlog, as it is the one that processes the potentially malicious serialized data. An attacker with the ability to influence the data being logged could craft a serialized PHP object that, when deserialized by this function, would trigger the vulnerability.