Lab: Exploiting Ruby deserialization using a documented gadget chain
Summary: This PortSwigger lab uses a serialization-based session mechanism in the Ruby on Rails framework, where documented exploits enable remote code execution via a gadget chain. The task is to find a documented exploit, adapt it into a malicious serialized object carrying a remote code execution payload, and pass it into the website to delete the morale.txt file from Carlos's home directory.
Key Takeaway: The lab's objective is deleting a single file from one user's home directory, but the same documented gadget chain that achieves it is a remote code execution path through a deserialized session object.
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