Lab: Exploiting PHP deserialization with a pre-built gadget chain
Summary: PortSwigger's lab presents a PHP application with a serialization-based session mechanism that uses a signed cookie and a common PHP framework, with no source code access provided. The exercise is to identify the target framework, use the third-party PHPGGC tool to generate a malicious serialized object containing a remote code execution payload, and produce a valid signed cookie that deletes the morale.txt file from Carlos's home directory.
Bottom line: The exploit requires no source code: a pre-built gadget chain for a common PHP framework plus a forged signed cookie is enough to reach remote code execution, so a framework's own classes can supply the attack path when deserialization trusts user input.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026