CVE-2022-29176CWE-862

Unauthorized gem takeover for some gems on rubygems.org

Critical · published May 5, 2022

CVSS v3.1
9.9
EPSS
2%
Percentile
79.9
In the wild
Unconfirmed
What it is

🚨 A sneaky bug in RubyGems lets unauthorized users yank and replace gems — like a prankster swapping ingredients in your favorite recipe! 🍰 This vulnerability is akin to a chef who can sneak into the kitchen and swap out the vanilla extract for something else without anyone noticing. If a gem name had dashes and was created recently or hasn’t been updated in a while, it could lead to chaos! An attacker could stealthily replace a gem with a malicious version, potentially introducing vulnerabilities into countless applications. 🍀 Imagine your software relying on an unsafe gem that looks seemingly normal, leading to devastating outcomes such as data breaches or system compromises.

Put simply

This vulnerability is akin to a chef who can sneak into the kitchen and swap out the vanilla extract for something else without anyone noticing. If a gem name had dashes and was created recently or hasn’t been updated in a while, it could lead to chaos! This vulnerability allows any user on RubyGems.org to yank and replace certain gem versions that meet specific criteria, even without authorization, due to a flaw in the yank action.

What to do

An attacker could stealthily replace a gem with a malicious version, potentially introducing vulnerabilities into countless applications. 🍀 Imagine your software relying on an unsafe gem that looks seemingly normal, leading to devastating outcomes such as data breaches or system compromises. To secure your applications, ensure you're using Bundler in --frozen or --deployment mode to prevent unexpected gem switches. Review your Gemfile.lock for any gem whose platform changed without a version change, and update it accordingly. Lastly, always patch your environment to the latest version of RubyGems to avoid this vulnerability. You've got this! 🦸‍♂️ Stay vigilant and follow these steps to keep your gems sparkling and secure.

The record
Technical detail
CVSS v3.1
9.9 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01938 · 79.9th percentile
Weakness
CWE-862 · Missing Authorization
Published
2022-05-05T22:05Z
EPSS history
Timeline
  • 05 MAY 22:05Z
    Unauthorized gem takeover for some gems on rubygems.org
    cvelistv5