Critical RubyGems.org flaw could allow code execution on registry servers; no exploitation found
Compiled by RedTeamDaily · AI-assisted summaries · Human review not recorded for this version
Published
What happened
RubyGems.org, the main registry for Ruby software packages, disclosed a serious flaw in how it handles uploaded package information. An attacker with a publishing account could potentially run code on the registry's servers, though the flaw was only shown in a test setup. The maintainers found no evidence it had been used against the public service.
Like I’m new · Written by AI from 1 source · Report an error
In depth
RubyGems.org disclosed a critical package upload flaw in which the registry checks gem metadata against rules for each field. The validator treated a value as plain text, while the YAML parser turned the same value into a regular expression. The registry processed this metadata before checking whether the publisher owned the package name, so the ownership check could not prevent the parsing flaw.
In local testing, the registry flaw combined with a separate memory corruption bug in Ruby's regular expression compiler allowed code to run with the permissions of the process handling gem uploads. The advisory does not report code execution on the live service, and it warns that other Ruby builds could still face upload worker crashes or memory exhaustion.
Maintainers reviewed production activity for 29,100 gems published from 5 October to 4 November 2026 and found no direct evidence of exploitation. They could not rule out earlier attempts because logs were kept for a limited time and upload contents were not logged.
The fix rejects regular expressions in gemspec fields that expect text and limits which Ruby objects the parser can create. This flaw is on the registry side, unlike earlier malicious gem campaigns that affected developers who installed packages.
Key points
- The flaw is rated CVSS 4.0 9.0 in advisory GHSA-7h7w-m82c-x2xg, and no CVE identifier is listed.
- Maintainers demonstrated remote code execution only in a local test using Ruby 4.0.9, and found no direct evidence of exploitation on the public registry.
- An attacker would need a RubyGems.org account and an API key with permission to publish packages, but no action by another user.
Q&A
- Is the public RubyGems.org service at risk right now?
- The maintainers found no direct evidence that the flaw was exploited on the public registry. The hosted service has already been handled, so developers using it do not need to take action.
- Who needs to act on this?
- Teams running a self-hosted RubyGems.org deployment need to update to a code revision containing the fix, rather than waiting for a patched gem release.
rubygemsruby gemspackage registryremote code executiongemspecdeserializationsupply chain securityghsa-7h7w-m82c-x2xg
- Publishers
- 1
Sources and verification
Sources and editorial review
No named human review has been recorded for this story.
How severity and exploitation labels work · All sources · Report an error
What to do
- Teams running a self-hosted RubyGems.org deployment should update to a code revision that contains the fix.
- Developers using the hosted RubyGems.org service do not need to take any action.
Written by AI from the sources, checked against them
Source timeline (UTC) · 1 update
1 published report from 1 publisher. Independent confirmations are unverified.
Explore this report
Ask AI about this story
Optional follow-up answers generated from our coverage. Check the linked sources before acting.
Ask your own questionWho and what is in it
Products