php-serialize-audit

Audit PHP code for deserialization vulnerabilities and POP chain risks.

80|6|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/yunmengya/PHP_AUDIT_SKILLS --skill php-serialize-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-serialize-audit
Source: https://github.com/yunmengya/PHP_AUDIT_SKILLS/tree/main/php-serialize-audit
Command: npx skills add https://github.com/yunmengya/PHP_AUDIT_SKILLS --skill php-serialize-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical security risks associated with PHP deserialization, including the exploitation of Phar archives and POP (Plain Old PHP) chains, to identify and report vulnerabilities.

Core Features & Use Cases

  • Vulnerability Identification: Detects unserialize() and Phar:// wrapper usage, pinpointing potential entry points for attacks.
  • POP Chain Analysis: Identifies and analyzes magic methods (like __wakeup, __destruct) to construct potential POP chains for exploitation.
  • Input Controllability Assessment: Traces data flow to determine if user-controlled input can reach deserialization sinks.
  • Evidence Recording: Documents the evidence chain, controllability, and findings for detailed reporting.
  • Use Case: Auditing a PHP application to find and report on deserialization vulnerabilities that could lead to Remote Code Execution (RCE) via POP chains.

Quick Start

Use the php-serialize-audit skill to audit the project for deserialization vulnerabilities and POP chain risks.

Frequently Asked Questions about php-serialize-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit PHP code for deserialization vulnerabilities and POP chains?

To audit PHP deserialization vulnerabilities, you need to identify `unserialize()` and `Phar://` triggers, trace user-controlled input to these sinks, and analyze magic methods for POP chain construction. This process pinpoints potential Remote Code Execution risks.

What is a Phar deserialization vulnerability and how does it trigger?

A Phar deserialization vulnerability triggers when operations using the `Phar://` wrapper access a crafted archive, automatically deserializing its metadata. Auditing detects `Phar://` usage and checks if user input controls the file path to reach the sink.

How do I trace user-controlled input to PHP deserialization sinks?

Tracing input controllability to PHP deserialization sinks involves following data flow from request inputs to vulnerable functions. The audit records evidence chains to confirm whether attacker-controlled data reliably reaches `unserialize()`.

Can I analyze PHP magic methods to construct potential POP chains?

Yes, analyzing PHP magic methods like `__wakeup` and `__destruct` allows you to construct potential POP chains. The audit identifies these methods to map how properties propagate through classes to achieve code execution.

How do I report PHP deserialization findings in a structured format?

You can report PHP deserialization findings in structured JSON and Markdown formats. The audit documents the complete evidence chain, controllability analysis, and vulnerability details to generate comprehensive reports.

What are the limitations of auditing PHP deserialization vulnerabilities automatically?

Automatic auditing of PHP deserialization vulnerabilities may face limitations with complex or obfuscated POP chains where data flow is difficult to trace. It primarily focuses on identifying `unserialize()` and `Phar://` triggers, which might miss deeply nested execution paths.