Intel

AIKIDO-2026-297886

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

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 21, 2026
August 21, 2026

20

CVE Score

Low

Denial of Service (DoS)

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.

How do I fix this?

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

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.

Versions

3.5.0 - 4.0.18

Fixed in 4.0.19

Background info

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

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea