The problem of serialization and deserialization of objects has reached Ruby. Bug found by the experts from the company Elttam, Australia.
Serialization in programming is the translation of a data structure into any other format more convenient for storage. The inverse operation is the operation of deserialization - the restoration of the initial state of the data structure from the bit sequence. The possibility of this is built into Ruby and, as it turned out, it allows attackers to use the native language mechanisms to carry out their attacks.
Elttam researchers have added a proof-of-concept exploit to the report that implements it. The problem is that these mechanisms are built into the language itself, namely in versions from 2.0 to 2.5. It is also assumed that it is possible to refine the attack methods for older versions. In addition, alternative implementations of Ruby called JRuby and Rubinius can potentially have similar problems.
Vulnerabilities of serialization and deserialization of objects exist in other languages. In 2015, they were found in the FoxGlove Security for Java library. In 2017, a similar problem was discovered in .NET libraries, and in 2018, in PHP. In the latter case, it affects the WordPress engine. Often problems are solved by the release of patches, although bugs are often difficult to detect. At the same time, it should be understood that the serialization and deserialization of data in itself weakens their protection.