Ruby 4.0: Universal Deserialization Gadget Chain Enables Critical RCE
Researcher elttam has identified a critical vulnerability in Ruby 4.0 involving a universal Remote Code Execution (RCE) gadget chain within the Marshal.load method. Unlike previous deserialization attacks that relied on specific third-party gems or frameworks to build exploit chains, this discovery utilizes a sequence of Ruby core class instantiations to trigger arbitrary command execution. By passing a specifically crafted binary payload to any Marshal.load sink processing untrusted input, attackers can achieve full system compromise. This finding shifts the threat model from application-specific risk to a systemic vulnerability inherent in the Ruby 4.0 core serialization mechanism, necessitating immediate transition to safer serialization formats like JSON.