---
title: RubyGems.org GHSA-7h7w-m82c-x2xg (critical): !ruby/regexp gemspec tags let any push-capable API key reach code execution on the registry; fixed server-side | ctxsec
url: https://ctxsec.com/items/rubygems-org-ghsa-7h7w-x2xg-ruby-regexp-gemspec-tag-push-rce-fixed
description: "RubyGems.org's advisory (Nov 26) says its gem-push validator ignored the !ruby/regexp YAML tag, so attacker-controlled regexes were compiled before gem ownership checks; chained with a Ruby 4.0.9 regexp memory-corruption bug it gave RCE in local testing. Fixed on the hosted service; gem users need not act. Per The Hacker News, a review of telemetry and 29,100 gems found no direct evidence of exploitation, though log gaps mean earlier attempts can't be ruled out."
status: "vendor advisory (RubyGems.org)"
published: 2026-11-30
---

> RubyGems.org's advisory (Nov 26) says its gem-push validator ignored the !ruby/regexp YAML tag, so attacker-controlled regexes were compiled before gem ownership checks; chained with a Ruby 4.0.9 regexp memory-corruption bug it gave RCE in local testing. Fixed on the hosted service; gem users need not act. Per The Hacker News, a review of telemetry and 29,100 gems found no direct evidence of exploitation, though log gaps mean earlier attempts can't be ruled out.

[← Cybersecurity News](/news) · [markdown](/items/rubygems-org-ghsa-7h7w-x2xg-ruby-regexp-gemspec-tag-push-rce-fixed.md)

vendor advisory (RubyGems.org)

2026-11-30 2:47 PM ET

### RubyGems.org GHSA-7h7w-m82c-x2xg (critical): !ruby/regexp gemspec tags let any push-capable API key reach code execution on the registry; fixed server-side

- **Why it matters:** code execution on a package registry is a supply-chain risk for every Ruby user.
- **Action:** none for gem consumers; self-hosted rubygems.org forks should pull the fix.

Sources: [RubyGems.org GitHub advisory GHSA-7h7w-m82c-x2xg (Nov 26, 2026)](https://github.com/rubygems/rubygems.org/security/advisories/GHSA-7h7w-m82c-x2xg) · [The Hacker News (Nov 30, 2026)](https://thehackernews.com/2026/11/critical-rubygems-flaw-could-have-let.html)
