Preliminary research
Ruby 4.0 Universal RCE Deserialization Gadget Chain
Last synced: 5 December 2026.
A universal Marshal.load chain for Ruby 4.0.6, built from RubyGems classes that naming Gem::SpecFetcher autoloads. Time._load validates its zone inside rb_rescue, discarding the exception, and calls to_str, which Gem::URI::Generic aliases to to_s to drive a download that writes attacker-hosted Ruby to disk by directory traversal. A Gem::StubSpecification used as a Hash key gets hash called while Marshal rebuilds the hash, reaching Gem::Specification.load, which evals that file.
Preserved copies · Luke Jahnke · Original publication ↗
Record
- Researcher
- Luke Jahnke
- Published by
- elttam.com
- Topic
- Server
In the archive
Related sources
- Ruby Marshal Kick-off Gadgets
Luke Jahnke · elttam.com
Preserved copies of this source
Tags
This page is the archive's own catalogue record. The research is the work of Luke Jahnke, first published at the original source. Preserved copies are kept so the citation survives its host.