RubyGems Vulnerability: Critical 9.0 Code Execution Flaw in RubyGems.org Gem Pushes, No CVE, No Action for Hosted Users, and What Ruby Teams Should Check
RubyGems.org disclosed a critical flaw, rated 9.0, where a gem push could lead to remote code execution. Here is what is confirmed, what is not known and what Ruby teams should check this week.
Where Worldwide
On this page 8 sections
RubyGems.org, the public registry Ruby software downloads its gems from, disclosed a critical flaw that let anyone with an account and an upload key reach remote code execution through a gem push. If your business runs software written in Ruby, the fix sits on the registry's side and a report on the advisory says hosted users have nothing to do. The story still matters, because it shows how much of your software depends on services you never patch yourself.
What happened with the RubyGems vulnerability
On November 26, 2026, colby-swandale published security advisory GHSA-7h7w-m82c-x2xg on the RubyGems.org GitHub project. Its title: "Authenticated remote code execution in RubyGems.org gem pushes via !ruby/regexp gemspec tags".
The key facts from the advisory:
- Severity: Critical, with a score of 9.0. Cyber Security News reports this is a CVSS 4.0 score.
- Weakness: CWE-502, deserialization of untrusted data.
- CVE: the advisory lists "No known CVE".
- Who could attack: the advisory says "An attacker only needs a RubyGems.org account and a push-capable API key, not ownership of any gem."
- How it was tested: "This was reproduced locally against Ruby 4.0.9 rather than against the live service."
"Authenticated" here is a low bar. Anyone can open a RubyGems.org account and create an API key that can push gems. The attacker did not need to control a popular package or break into a maintainer's account.
What is confirmed, what is reported and what is not known
Confirmed in the advisory itself:
- The flaw was in how gem pushes were handled, using gemspec fields carrying the
!ruby/regexptag. - The fix removed
!ruby/regexpfromGemValidator::NodeInfo::IGNORED_TAGS, so schema validation now rejects regexp-tagged gemspec fields. - The proof was reproduced locally on Ruby 4.0.9, not run against the live service.
- Maintainers reviewed production telemetry and 29,100 gems published between 5 October and 4 November 2026.
Reported by Cyber Security News, summarizing the advisory:
- The review found no direct evidence that attackers exploited the flaw on the public registry.
- "Developers who use the hosted RubyGems.org service do not need to take action."
- The attack worked by combining the gemspec issue with a separate memory corruption bug in Ruby's regular expression compiler.
Not known from the sources we checked:
- Who found and reported the flaw.
- Why the review covered 5 October to 4 November 2026, or whether gems pushed earlier were checked.
- Which Ruby versions carry the regular expression compiler bug, or whether a Ruby release fixes it.
- The exact date the fix went live on RubyGems.org.
No evidence of exploitation is not the same as proof that nothing happened. It means the maintainers looked at the data they had for that window and did not find signs of abuse.
How the RubyGems gem push flaw worked
When a developer publishes a gem, they upload a package with a gemspec, a file that describes the gem: its name, version, authors and so on. RubyGems.org checks that metadata against a schema before it accepts the upload.
The validator kept a list of tags it ignored, and !ruby/regexp was on that list. So a gemspec field tagged as a regular expression got past schema validation. According to Cyber Security News, an attacker could pair that with a separate memory corruption bug in Ruby's regular expression compiler to reach code execution.
That is what CWE-502 describes: software turns data from an outsider back into live objects without checking it closely enough. The fix closes the door at the validator. Regexp-tagged fields are now rejected instead of skipped.
Do I need to do anything about the RubyGems vulnerability?
If your team installs gems from the hosted RubyGems.org service, the report on the advisory says you do not need to take action. You do not need to update a gem or reinstall anything because of this advisory.
That does not mean there is nothing worth checking. The attack needed only an account and a push-capable API key. Those keys are worth tracking anyway, because a key that can push gems is a key that can publish code under your name.
The Ruby regular expression compiler bug is a separate issue. Our sources do not name an affected version range or a fixed Ruby release, so we are not going to guess one. Watch the official Ruby release notes and treat any fix for it as a normal Ruby update.
Why a registry flaw matters to a business
Your Ruby apps pull code from RubyGems.org every time they install dependencies. You trust that service to hand you exactly what the gem author published. A flaw that lets a stranger run code on the registry side touches that trust directly, even when you have nothing to patch.
This is the part of software ownership that is easy to miss. You can keep your own servers patched and still depend on dozens of outside services you never see. We covered the same gap from the server side in Who Is Patching the Software That Runs Your Business?, and the difference between installing an update and actually being protected in Updated Is Not the Same as Patched.
In this case the registry maintainers did the work: they fixed the validator, reviewed a month of uploads and published what they found. The business question is whether anyone on your side would have known to read that advisory and decide whether it applied to you.
RubyGems security checklist for this week
| What to check | Why | How |
|---|---|---|
| Confirm you install gems from hosted RubyGems.org | The report says hosted users need no action | Check where your apps' gem sources point |
| List every RubyGems.org account your team uses | The attack needed only an account | Ask developers and contractors who publish gems |
| Review push-capable API keys | The attack needed a key that can push | Remove keys nobody uses or recognizes |
| If you run your own copy of the rubygems.org app, check the validator | The fix lives in the application code | Confirm !ruby/regexp is no longer in GemValidator::NodeInfo::IGNORED_TAGS |
| Track the Ruby regex compiler bug | No fixed Ruby version is named in our sources | Watch official Ruby release notes |
| Name an owner for dependency advisories | Someone has to read and decide | Put it in a job description, not a hope |
RubyGems vulnerability questions people are asking
Is there a CVE for the RubyGems.org flaw?
No. The advisory lists "No known CVE". It is tracked as GHSA-7h7w-m82c-x2xg on GitHub.
Was the RubyGems vulnerability exploited?
According to Cyber Security News, the maintainers found no direct evidence that attackers exploited it on the public registry. Their review covered production telemetry and 29,100 gems published between 5 October and 4 November 2026.
Do I need to update my gems or Ruby?
Not because of this advisory, if you use the hosted service. The report says hosted RubyGems.org users do not need to take action. Keep Ruby itself updated as normal, since the related regex compiler bug is a separate issue.
Who could have used this flaw?
Anyone with a RubyGems.org account and a push-capable API key. The advisory says ownership of any gem was not required.
What is CWE-502?
It is the MITRE category for deserialization of untrusted data: turning outside input into live program objects without checking it closely enough.
How bad is a CVSS score of 9.0?
The advisory rates it Critical. A 9.0 sits near the top of the 10-point scale.
Does this affect my own gem server?
Our sources only describe the RubyGems.org service and its application code. If you run your own copy of that code, check that it includes the validator fix described above.
The bigger lesson
The most important code in your business is not always code you run. Package registries, cloud services and vendor platforms all sit in your supply chain. Someone on your side should know which ones you depend on and read their advisories when they come out.
If you want your dependencies and servers reviewed, see security hardening or request a tech quote.
Get security alerts by email, with the free checklist, at security alerts.
Sources: RubyGems.org advisory GHSA-7h7w-m82c-x2xg; Cyber Security News.
Have a question about this article?
Ask it here and we will answer you directly by email. Questions are private, never posted.
Security alerts by email
Hear about the next one first.
When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.
Want a result like this?
Security alerts, breaches and the technology a business runs on: what happened, who it affects and what to do.
Get a Tech QuoteKeep reading
EDK II PXE Boot Vulnerability CVE-2026-97631: Network Attackers Can Run Code Before the OS and Secure Boot Load, No Patch Yet, and What to Do This Week
An unpatched flaw in EDK II's network boot code lets an attacker on the network run code while a machine PXE b...
VirtualBox Vulnerability CVE-2026-87268: A Single-Bit .NET Change Let Untrusted Code Load, the Related .NET Framework Fix and What to Check This Week
Google Project Zero showed that a single-bit change was enough to load untrusted .NET code. The research led t...
ARTEX Kubernetes Attack: Attackers Repurposed an Open-Source AI Pentest Framework to Reach Cluster-Admin, What Is Confirmed and What to Check This Week
Attackers repurposed ARTEX, an open-source AI penetration testing framework, in a campaign Wiz tied to more th...