SecOraLens
CriticalCVE

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

The Hacker News·Source published ·1 min read

What happened?

RubyGems.org, the central registry for the Ruby community's gems, has fixed a critical flaw that let any account with a push-capable API key feed an attacker-controlled regular expression into the metadata of a gem upload.

Key details

  • Maintainers chained the flaw with a Ruby regexp compiler memory corruption bug to achieve remote code execution in local testing.
  • The validator ignored the !ruby/regexp YAML tag, allowing it to pass schema checks as plain text before Psych compiled it into a real regular expression.
  • Even without code execution, compiling an attacker-supplied pattern can crash upload workers or exhaust their memory.
  • The hosted registry now rejects regexp-tagged gemspec fields with HTTP 422, uses a restricted YAML loader, and caps OIDC policy patterns at 255 characters.

What is affected?

  • Ruby versions affected by the seven regexp engine and string case conversion flaws patched on November 18.

Summarised by SecOraLens from The Hacker News. Always read the original source before acting. How SecOraLens verifies advisories.

What to do next

For CISOs and SOC leads

Brief your board. Brief your team.

Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.