Php unserialize

From zakirkun/ice-tea · View interactive version

Php unserialize is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects PHP unserialize() called on user-controlled input, enabling object injection and remote code execution.

How to use this skill

Skill file

PHP Insecure Deserialization

Overview

PHP's unserialize() function reconstructs PHP objects from a string representation. When called with user-controlled input, attackers can craft malicious serialized strings that:

This is the basis of PHP Object Injection attacks.

Remediation

Safe:

$data = json_decode($_POST['data'], true); // Safe alternative
// OR if PHP object needed, restrict classes:
$obj = unserialize($data, ['allowed_classes' => ['SafeClass']]);
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.