RubySec

Providing security resources for the Ruby community

GHSA-xfw4-3v4j-82mr (gemstash): Gemstash lets any client choose the upstream it fetches from (SSRF, open redirect)

Gemstash lets any client choose the upstream it fetches from (SSRF, open redirect)

Published: November 19, 2026

SECURITY IDENTIFIERS

GEM

gemstash

LIBRARY

RubyGems

PATCHED VERSIONS

>= 2.9.0

DESCRIPTION

Summary

Gemstash fetches from, or redirects to, whichever gem source a client names, with the X-Gemfile-Source header that Bundler sends when Gemstash is used as a mirror, or with an /upstream/<url>/ or /redirect/<url>/ path prefix. The URL is not checked. Anyone who can reach a Gemstash server can make it send GET requests to any host the server can reach and read the response, or build a URL on the server that redirects to any site.

Impact

SSRF with the response returned to the client: loopback services, the internal network, cloud metadata endpoints. Open redirect from the Gemstash origin. Attacker-chosen content stored under a gem name. TLS silently dropped on a redirected download.

RELATED