RubySec

Providing security resources for the Ruby community

GHSA-c927-fwqw-cm2g (gemstash): Gemstash holds upstream responses of any size in memory (DoS)

Gemstash holds upstream responses of any size in memory (DoS)

Published: November 19, 2026

SECURITY IDENTIFIERS

GEM

gemstash

LIBRARY

RubyGems

PATCHED VERSIONS

>= 2.9.0

DESCRIPTION

Summary

Every response from an upstream gem source is read into memory in full before it is checked, stored or passed on, and nothing limits its size. Because a client chooses the upstream by default, anyone who can reach a Gemstash server can point it at a server that answers with a very large or endless body.

Impact

A handful of concurrent requests exhaust the memory of the Gemstash process and take the server down, stopping installs, builds and deploys that depend on it. With trusted upstreams only, a single oversized gem has the same effect.

RELATED