Ruby 4.0 Universal RCE Deserialization Gadget Chain
- Security
- Programming
- Open Source
- Developer Tools
The post presents a universal deserialization gadget chain for Ruby 4.0. In plain terms, it shows how an attacker who can feed untrusted data into `Marshal.load` can get code execution using objects already present in common Ruby installs. Nobody took that as proof that Ruby is broken by default. The core point is narrower and more practical: Ruby still has a well-known dangerous deserialization primitive, and this work packages that danger into a fresh exploit chain after earlier gadgets were removed.
If any part of your stack still deserializes Ruby Marshal data from cookies, blobs, caches, queues, or package metadata you do not fully control, treat it as an RCE path and remove it. For platform and package maintainers, class allowlists or a safer metadata format look more durable than whack-a-mole gadget cleanup.
-
elttam.com
- Discuss on HN