Gemstash vulnerable to unauthenticated remote code execution via unsafe deserialization of upstream dependency responses
Published: November 19, 2026
SECURITY IDENTIFIERS
- GHSA: GHSA-27cp-f4p8-8qwv
- Vendor Advisory: https://github.com/rubygems/gemstash/security/advisories/GHSA-27cp-f4p8-8qwv
GEM
LIBRARY
PATCHED VERSIONS
>= 2.9.0
DESCRIPTION
Summary
Gemstash lets any unauthenticated client choose the upstream gem server, and it loads that server's dependency response with Marshal.load. An attacker who can reach a gemstash server over HTTP can execute code as the gemstash process. All releases from 1.0.0.pre.1 through 2.8.2 are affected in their default configuration.
Impact
Unauthenticated remote code execution (CWE-502) with the privileges of the user running gemstash. The attacker can read and modify everything that process can: cached gems, private gems, API keys, and any credentials in the gemstash configuration. Because gemstash serves gems to developer, CI, and deploy machines, the attacker can also alter the gems it serves and extend the compromise to those systems. Any client that can reach the server can exploit it, including clients on an internal network.
