rubygems-update is vulnerable to Denial of Service (DoS)
20
CVE Score
Low
Denial of Service (DoS)
Gem::SafeMarshal::Reader#read_integer can decode a 4-byte collection length of up to about 4.3 billion, and read_array, read_hash, read_hash_with_default_value, read_object_with_ivars, and read_object passed that length straight to Array.new, which allocates the backing store before any element is read. A crafted Marshal payload as small as 8 bytes can therefore force a huge allocation and raise NoMemoryError when RubyGems loads a gemspec. The fix introduces a read_count helper that raises LengthTooLongError when the declared count exceeds remaining input bytes, and adds the missing negative-length check in read_hash.
Upgrade the rubygems-update library to the patch version (by updating RubyGems).
You are affected if you are using a version that falls within the vulnerable range and RubyGems loads Marshal gemspecs from an untrusted or compromised gem source.
3.5.0 - 4.0.18
Fixed in 4.0.19rubygems-update is vulnerable to Denial of Service (DoS) in versions 3.5.0 - 4.0.18.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.