Intel

AIKIDO-2026-297886

rubygems-update is vulnerable to Denial of Service (DoS)

Denial of Service (DoS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 21, 2026

20

Low Risk

This Affects:

RUBYrubygems-update
3.5.0 - 4.0.18
Fixed in 4.0.19
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

rubygems-update is vulnerable to Denial of Service (DoS) in versions 3.5.0 - 4.0.18.

How to fix this

Upgrade the rubygems-update library to the patch version (by updating RubyGems).

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform