Critical RubyGems Vulnerability Could Let Attackers Execute Code on Package Registry Servers
What happened?
RubyGems.org disclosed a critical package upload flaw that could let authenticated attackers execute code on registry servers by exploiting how gem metadata is processed. Maintainers demonstrated remote code execution in a local test using Ruby 4.0.9. However, they found no direct evidence that attackers exploited the flaw on the public registry. The GitHub security advisory, GHSA-7h7w-m82c-x2xg, was published on November 26, 2026, and carries a CVSS 4.0 score of 9.0 out of 10. The advisory lists no known CVE identifier.
Key details
- RubyGems.org disclosed a critical flaw in gem metadata processing that could allow authenticated attackers to execute code on registry servers.
- An attacker needs a RubyGems.org account and API key with publish permissions but does not need to own an existing gem or require user interaction.
- Local testing combined the registry flaw with a Ruby regex compiler memory corruption bug to achieve remote code execution as the upload worker process.
- Maintainers reviewed 29,100 gems published between October 5 and November 4, 2026, and found no direct evidence of exploitation on the live service.
- The advisory warns that even Ruby builds not vulnerable to code execution could still suffer upload worker crashes or memory exhaustion.
What is affected?
- RubyGems.org package registry server software.
- Self-hosted RubyGems.org deployments.
How do I fix or mitigate it?
- Self-hosted deployments should update to a code revision containing the fix rather than wait for a patched gem release.
Summarised by SecOraLens from Cyber Security News. Always read the original source before acting. How SecOraLens verifies advisories.
What to do next
Brief your board. Brief your team.
Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.
