RubyGems Fixes Critical Metadata Flaw Enabling Registry Server Code Execution
Vulnerability Disclosure · 3 sources · Updated 48m ago · First seen Nov 30, 2026

RubyGems.org fixed a critical package-upload vulnerability that could let authenticated publishers execute code on registry servers through malicious gem metadata. The advisory, GHSA-7h7w-m82c-x2xg, carries a CVSS 4.0 score of 9.0 and has no known CVE identifier. Accounts with push-capable API keys could exploit unsafe metadata deserialization to trigger compilation of attacker-controlled regular expressions. Maintainers demonstrated remote code execution locally on Ruby 4.0.9 by chaining the flaw with a separate Ruby regular-expression compiler memory-corruption bug, gaining the privileges of the gem-upload worker. Other Ruby builds could still face worker crashes or memory exhaustion.
A review of production activity and 29,100 published gems found no direct evidence of exploitation, although incomplete logging prevented maintainers from ruling out earlier attempts. The hosted registry now uses restricted YAML loading and rejects regular-expression objects in metadata text fields. Hosted RubyGems.org users and gem consumers need take no action for the registry flaw; self-hosted registry operators should update their deployment code to a revision containing the fix. Separately, Ruby application operators should use runtime versions containing fixes for the underlying Ruby vulnerabilities.
Why it matters
RubyGems.org's upload-processing flaw could enable registry-worker code execution or disruption; maintainers found no direct evidence of exploitation and have fixed the hosted service.
Maintainers demonstrated code execution locally with the permissions of the gem-upload worker, not on the production service. Access to published gems or publishing credentials was not established. Upload-worker crashes and memory exhaustion remained possible on Ruby builds not susceptible to the demonstrated code-execution chain. Source
The production review covered activity and 29,100 gems published October 5–November 4, 2026. It found no direct evidence of exploitation, but limited log retention and absent upload-payload logging prevent ruling out earlier attempts. The registry's approximately 199,000 gems and more than 278 billion recorded downloads illustrate its importance, not a count of compromised packages or users. Source
Industry-specific impact: Information Technology is specifically affected through RubyGems.org's software-package registry operations and potentially self-hosted deployments of its registry software. The vulnerability resides in the registry's upload service; this does not establish compromise of downstream software consumers or industry-specific impact beyond registry operations. Source
Geography-specific impact is not established. The supplied content identifies no affected country, geographic targeting, or jurisdiction-specific obligation.


