[php-src] Issue #21824: Crash in unserialize()

From: Date: Tue, 21 Apr 2026 20:48:59 +0000
Subject: [php-src] Issue #21824: Crash in unserialize()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251995@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/21824 Author: iluuu1994 ### Description Originally reported by @calysteon. ```php <?php class Trigger { public function __destruct() { @unserialize('i:1;'); } } $payload = 'a:1019:{'; for ($i = 0; $i < 1017; $i++) { $payload .= "i:$i;s:1:\"A\";"; } // Entry that overflows into a second var_entries block $payload .= 'i:1017;O:7:"Trigger":0:{}'; // Duplicate key overwrites Trigger, pushing it to dtor list (refcount stays at 1) $payload .= 'i:1017;i:0;}'; $result = @unserialize($payload); ``` ### PHP Version ```plain - ``` ### Operating System _No response_

« previous php.bugs (#251995) next »