PHP Deserialization Risks: Why unserialize Is Unsafe for User Input
The PHP manual warns: do not pass untrusted input to unserialize(), regardless of allowed_classes. Unserialization can instantiate objects and run code during autoloading. Prefer json_encode() / json_decode() for data you accept from users, and treat allowed_classes as a hardening step for trusted payloads only.
