[HIGH] Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry (CVSS 9.0)
Yes, if you self-host RubyGems.org or run Ruby 3.3/3.4/4.0 versions prior to the November 18 patches: you are exposed to potential remote code execution or denial of service via crafted gem metadata. · Fixed in: Ruby 4.0.10, Ruby 3.4.13, Ruby 3.3.14, Self-hosted RubyGems.org: Update to commit c
← Part of Daily Briefing (2026-12-01) · All Advisories · Official Vendor Source ↗
Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry
The Hacker News [CORE INFRA RCE] | CVSS 9.0
❓ Why Should I Care?
Yes, if you self-host RubyGems.org or run Ruby 3.3/3.4/4.0 versions prior to the November 18 patches: you are exposed to potential remote code execution or denial of service via crafted gem metadata.
🎯 Affected versions: Self-hosted RubyGems.org instances (prior to Nov 4, 2026 fix); Ruby 3.3.x < 3.3.14, 3.4.x < 3.4.13, 4.0.x < 4.0.10
Not affected: Users of the hosted RubyGems.org service (fixed); Ruby versions 3.3.14+, 3.4.13+, 4.0.10+
🎭 In plain English:
A flaw in how the RubyGems registry processed gem metadata allowed an attacker to inject malicious code that could crash the server or execute arbitrary commands. For example, a malicious gem publisher could have uploaded a gem with a specially crafted regular expression that crashed the registry's worker or ran code on the server.
🔧 Prerequisites:
- Self-hosting RubyGems.org software (not using the hosted service)
- Running a Ruby version vulnerable to regexp memory corruption (3.3.x < 3.3.14, 3.4.x < 3.4.13, 4.0.x < 4.0.10)
- Possession of a push-capable API key for the registry
⏱ Urgency: Urgent for self-hosters and Ruby developers: update Ruby to the latest patched versions immediately and update self-hosted RubyGems instances to the latest commit to prevent potential RCE or DoS.
✅ Fixed in / Action: Ruby 4.0.10, Ruby 3.4.13, Ruby 3.3.14, Self-hosted RubyGems.org: Update to commit containing fix from Nov 4, 2026
💡 Context: The root cause was the YAML validator ignoring the !ruby/regexp tag, allowing Psych to compile attacker-controlled regular expressions before ownership checks, which could trigger memory corruption in vulnerable Ruby versions.
🦅 Read full 2026-12-01 Briefing | Release Radar | ☕ Support WSIC