RubyGems.org upload flaw enables authenticated remote code execution
Original title: Critical RubyGems Registry Vulnerability Enables Remote Code Execution via YAML Deserialization
Local tests on Ruby 4.0.9 showed RCE; no CVE is assigned and hosted users need not act.
RubyGems.org disclosed a critical YAML deserialization flaw in its package upload service, tracked as GHSA-7h7w-m82c-x2xg with a CVSS v4 score of 9.0 and no CVE. An authenticated account with a publishing API key could reach a metadata parser without owning an existing gem. Maintainers demonstrated code execution in local testing on Ruby 4.0.9, not against the live registry. A review of production telemetry and 29,100 gems published from October 5 through November 4, 2026, found no direct evidence of exploitation. Self-hosted operators must update to a commit containing the fix.
Unconfirmed: Limited log retention and unlogged upload payloads mean earlier exploitation attempts cannot be ruled out.
- Advisory published November 26, 2026; CVSS v4 is 9.0.
- The validator and Ruby Psych parsed the same gemspec metadata differently.
- Untrusted patterns could also crash a worker or exhaust memory.
- Hosted RubyGems.org users do not need to take action.
- The issue is separate from the GemStuffer documentation-worker campaign.
Impact: Remote code execution with upload-worker privileges
| Product | Affected |
|---|---|
| RubyGems.org registry upload service | — |
- 1.Self-hosted RubyGems.org operators should update to a commit that includes the fix.
- Vendors
- RubyGems
- Products
- RubyGems.org
From the original article
2 min read at gbhackers.com
RubyGems. org disclosed a critical vulnerability in its package upload service that allowed an authenticated account with a publishing API key to reach a vulnerable metadata parser without owning an existing gem. Maintainers demonstrated remote code execution in local testing on Ruby 4.
By Divya · gbhackers.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.