thehackernews.com·30 november 2026

Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry

Image for the article: Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry
Image via thehackernews.com

RubyGems.org fixed a critical flaw that could allow remote code execution by feeding an attacker-controlled regular expression into gem metadata. The flaw, tracked as GHSA-7h7w-m82c-x2xg, scores 9.0 on the CVSS scale and was chained with a memory corruption bug in Ruby's regexp compiler. No evidence of exploitation was found in production telemetry, but earlier attempts cannot be ruled out. The registry now rejects regexp-tagged gemspec fields and uses a restricted loader for gem metadata. Users of the hosted registry need take no action, but self-hosted operators should update their software.