Security researchers published a universal Ruby Marshal deserialization gadget chain that can achieve remote code execution in Ruby 4.0 by abusing RubyGems internals. The chain begins with Marshal.load and Time._load, where a crafted time-zone object triggers attacker-controlled to_str or to_s behavior.
The exploit builds a malicious RubyGems source URI that retrieves a compressed gemspec into /tmp/quick/Marshal.4.8/; Gem::StubSpecification and Gem::Specification.load subsequently evaluate the gemspec through Ruby eval. A proof of concept using an S3 URI and traversal-style port value executed id as root in a Ruby 4.0.6 container, though the demonstration also produced later Gem::StubSpecification errors. The technique provides an alternative to an older gadget path blocked by stricter type validation in Gem::Version#marshal_load.

See real exploitation activity before you spend the cycle.
2 events from the most recent confirmed update back to the earliest known activity.
A r/netsec post by AnimalStrange linked to elttam's research on a Ruby 4.0 universal remote-code-execution deserialization gadget chain.
elttam disclosed a universal Ruby Marshal.load deserialization gadget chain for Ruby 4.0 that abuses Time deserialization and RubyGems internals to reach Gem::Specification.load's eval sink. Its proof of concept demonstrated an attacker-controlled gemspec executing `id` as root in a ruby:4.0.6 Docker container.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
See real exploitation activity behind this advisory so you can triage it against everything else in the queue.
2 references tracked. Mallory keeps watching after this page renders.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.