Skip to main content
Mallory
← Back to News
internet-facing-service-vulnerabilityopen-source-dependency-vulnerability

RubyGems Fixes Critical Metadata Flaw Enabling Registry Server Code Execution

Vulnerability Disclosure · 3 sources · Updated 48m ago · First seen Nov 30, 2026

RubyGems Fixes Critical Metadata Flaw Enabling Registry Server Code Execution

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.

Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Nov 4, 2026 – Nov 26, 2026
  1. Reported Nov 30, 20264h ago

    Production review finds no direct evidence of exploitation

    Maintainers reviewed production activity and 29,100 gems published between October 5 and November 4, 2026, finding no direct evidence of exploitation. Limited log retention and missing upload-content logs prevented them from ruling out earlier attempts.

    Critical RubyGems Vulnerability Could Let Attackers Execute Code on Package Registry Servers | Cryptika Cybersecurity
  2. Reported Nov 30, 20264h ago

    Maintainers demonstrate registry-side code execution in a local test

    RubyGems.org maintainers chained unsafe gem metadata deserialization with a separate Ruby regular-expression compiler memory-corruption flaw on Ruby 4.0.9. The local demonstration achieved code execution with the upload worker's privileges; successful exploitation of the live registry was not established.

    Critical RubyGems Vulnerability Could Let Attackers Execute Code on Package Registry Servers | Cryptika Cybersecurity
  3. Nov 26, 20265d ago

    RubyGems.org discloses critical package-upload vulnerability

    Advisory GHSA-7h7w-m82c-x2xg disclosed a CVSS 9.0 metadata-processing flaw that allowed accounts with publishing-capable API keys to trigger attacker-controlled regular-expression compilation before package ownership checks. The flaw could enable code execution when chained with a vulnerable Ruby runtime, or cause worker crashes and memory exhaustion.

    Critical RubyGems Vulnerability Could Let Attackers Execute Code on Package Registry Servers | Cryptika Cybersecurity
  4. Nov 18, 202613d ago

    Ruby project patches seven runtime vulnerabilities

    The Ruby project patched seven vulnerabilities affecting its regular-expression engine and string case conversion in versions 4.0.10, 3.4.13, and 3.3.14. These runtime fixes are separate from the RubyGems.org registry remediation.

    Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry
  5. Nov 4, 202627d ago

    RubyGems.org metadata-validation fix enters public repository

    The fix rejects regular-expression-tagged metadata fields and uses restricted YAML loading to prevent unsafe object creation. The hosted registry was remediated, while self-hosted operators must update to a code revision containing the fix.

    Critical RubyGems Vulnerability Could Let Attackers Execute Code on Package Registry Servers | Cryptika Cybersecurity
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.