Call 800-929-5586
Let's connect
Security alertTrending · Not confirmed · Fix available

RubyGems.org gem upload remote code execution (no CVE assigned; GHSA-7h7w-m82c-x2xg)

Posted Nov 30, 2026, 9:14 PM PSTLast checked by BIS Nov 30, 8:22 PM PST1 update

Trending · Not confirmed yet. CISA and RubyGems.org maintainers (Ruby Central / rubygems.org project) have not confirmed this yet. This is based on reports from thehackernews.com, blog.ostorlab.co, businessupturn.com. BIS is watching it and will update this page as soon as official information is published.

Every gem carries a block of descriptive data (metadata) written in a format called YAML. The RubyGems.org upload checker did not screen out one special YAML tag that marks text as a 'regular expression' (a search pattern). The server then turned that text into a real pattern and processed it. This happened before the site checked who owned the gem, so anyone with an account and a push-capable API key (a secret code that lets you publish gems) could trigger it. In local testing, the maintainers combined this with a separate memory-corruption bug in Ruby's pattern engine and ran code on a test copy of the upload worker, using Ruby 4.0.9. Even without that second bug, a malicious pattern could crash an upload worker or use up its memory. The advisory was published November 26, 2026, and the fix was added to the public code on November 4. The advisory does not say whether an attacker who got that far could have reached published gems or publishing credentials. The CVSS score is 9.0, and no CVE ID has been assigned. The flaw is on the registry's server side, not in the gem command or in gems you have installed.

RubyGems.org, the main download site for Ruby software libraries (called gems), fixed a critical flaw in how it processes uploaded gems. The hosted site is already patched, and the maintainers found no direct evidence of attacks. Ordinary gem users need to do nothing.

Download this brief (PDF) · Nov 30, 2026, 9:14 PM PT

Who is affected

  • The hosted RubyGems.org service: was affected, now fixed by the maintainers.
  • Organizations that run their own copy of the RubyGems.org server software with code from before the fix.
  • Not affected: people who just install or publish gems from rubygems.org, and the gem command-line tool.

Is it being exploited?

No exploitation is confirmed. The maintainers reviewed production telemetry and 29,100 gems published between October 5 and November 4, 2026 and found no direct evidence of exploitation. They say logs were not kept long enough and upload contents were not recorded, so earlier attempts cannot be fully ruled out. The issue is not listed by CISA as exploited (not checked in the CISA KEV catalog directly).

What you should do now

Home users

  • Nothing to do. The maintainers say gem users do not need to take any action.
  • Keep your computer and any Ruby software updated as usual.

Businesses

  • If you only download or publish gems from rubygems.org, no action is needed for this flaw.
  • If you host your own RubyGems.org server, update it to a version of the code that contains the fix (GHSA-7h7w-m82c-x2xg). Updating your project's dependencies will not fix it.
  • Rejecting uploaded gem metadata that contains the regular-expression tag is the fix; the hosted site now returns an HTTP 422 error for it.
  • Separately, The Hacker News reports that Ruby fixed seven regular-expression and text-handling flaws on November 18. Keep Ruby up to date (4.0.10, 3.4.13 or 3.3.14, according to that report). Check the Ruby project's own announcement to confirm.

How to check if you're affected

  • Self-hosted operators: confirm your deployment's code includes the fix for GHSA-7h7w-m82c-x2xg (see the advisory linked below).
  • To see your Ruby version, open a terminal or command prompt and run: ruby -v
  • To see your RubyGems client version, run: gem -v

Fixed versions and workarounds

  • Hosted RubyGems.org: Already fixed on the live service
  • Self-hosted RubyGems.org: A commit containing the fix for GHSA-7h7w-m82c-x2xg (no release version number given in the sources I read)

Until you can update:

  • None needed on the hosted site. No other workarounds are listed in the sources I read.

About this advisory

Researched with AI help from public sources and checked against the official advisories listed with this alert. Details can change; follow your vendor's guidance.

Security news feeds we follow

Get every BIS alert in your news reader: Technology Alerts RSS. Follow the same sources we watch: download all of them as one file (OPML) and import it into any feed reader.

Questions? Contact BIS Computer Solutions, Inc.

5500 Alta Canyada Rd., La Canada, CA 91011 USA · Phone: +1-818-248-5023 · Fax: +1-818-249-1169 · Email: support@biscomputer.com · Web: www.biscomputer.com

What you need to do

If you only download or publish gems from rubygems.org, no action is needed for this flaw.

Is this a hack?

Not yet known No exploitation is confirmed. The maintainers reviewed production telemetry and 29,100 gems published between October 5 and November 4, 2026 and found no direct evidence of exploitation. They say logs were not kept long enough and upload contents were not recorded, so earlier attempts cannot be fully ruled out. The issue is not listed by CISA as exploited (not checked in the CISA KEV catalog directly).

When BIS marks this brief Resolved, it moves to Recently resolved on the Alerts page.

← All alerts

Tell us what you need. We will show you how BIS fits.

Get started