An issue was discovered in RDoc 6.3.3 through 6.6.2, as distributed in Ruby 3.x through 3.3.0. When parsing .rdoc_options (used for configuration in RDoc) as a YAML file, object injection and resultant remote code execution are possible because there are no restrictions on the classes that can be restored. (When loading the documentation cache, object injection and resultant remote code execution are also possible if there were a crafted cache.) The main fixed version is 6.6.3.1. For Ruby 3.0 users, a fixed version is rdoc 6.3.4.1. For Ruby 3.1 users, a fixed version is rdoc 6.4.1.1. For Ruby 3.2 users, a fixed version is rdoc 6.5.1.1.
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Red Hat Enterprise Linux 8 | RedHat | ruby:3.0-8100020240522072634.489197e6 | * |
Red Hat Enterprise Linux 8 | RedHat | ruby:3.1-8100020240510101534.489197e6 | * |
Red Hat Enterprise Linux 8 | RedHat | ruby:3.3-8100020240522151542.489197e6 | * |
Red Hat Enterprise Linux 8 | RedHat | ruby:2.5-8100020240627152904.489197e6 | * |
Red Hat Enterprise Linux 9 | RedHat | ruby:3.1-9040020240503183840.9 | * |
Red Hat Enterprise Linux 9 | RedHat | ruby:3.3-9040020240522171337.9 | * |
Red Hat Enterprise Linux 9 | RedHat | ruby-0:3.0.7-162.el9_4 | * |
Jruby | Ubuntu | mantic | * |
Ruby2.7 | Ubuntu | focal | * |
Ruby3.0 | Ubuntu | jammy | * |
Ruby3.1 | Ubuntu | mantic | * |
Ruby3.2 | Ubuntu | noble | * |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security – which is a dangerous security assumption. Data that is untrusted can not be trusted to be well-formed. When developers place no restrictions on “gadget chains,” or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.