CVE-2024-35221: Denial of service when publishing a package on rubygems.org
Rubygems.org is the Ruby community's gem hosting service. A Gem publisher can cause a Remote DoS when publishing a Gem. This is due to how Ruby reads the Manifest of Gem files when using Gem::Specification.fromyaml. fromyaml makes use of SafeYAML.load which allows YAML aliases inside the YAML-based metadata of a gem. YAML aliases allow for Denial of Service attacks with so-called YAML-bombs (comparable to Billion laughs attacks). This was patched. There is is no action required by users. This issue is also tracked as GHSL-2024-001 and was discovered by the GitHub security lab.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-35221?
CVE-2024-35221 is considered a critical vulnerability due to its potential for causing a Remote Denial of Service (DoS) when a Gem is published.
How do I fix CVE-2024-35221?
To mitigate CVE-2024-35221, ensure that your RubyGems environment is updated to the latest version that incorporates fixes for the vulnerability.
What types of systems are affected by CVE-2024-35221?
CVE-2024-35221 affects systems using RubyGems, particularly the RubyGems.org service for publishing Gems.
How does CVE-2024-35221 exploit Ruby's processing of YAML files?
CVE-2024-35221 exploits the way Ruby reads the Manifest of Gem files via Gem::Specification.from_yaml, leading to possible Remote DoS.
Can CVE-2024-35221 be exploited by any registered Gem publisher?
Yes, any registered Gem publisher can exploit CVE-2024-35221 by crafting specific Gem files to trigger the vulnerability.