Skip to content
Vulnerability Access control

RubyGems fixes critical yank bug allowing unauthorised gem takeover (CVE-2022-29176)

RubyGems patched a flaw that let any user remove and replace certain gems without authorisation.

Reported by thehackernews.com

Summary updated

Read the coverage
Public PoC
Not known
Exploited
No
Severity
Not rated

What happened

RubyGems maintainers fixed a critical flaw in the yank action that could let unauthorised users remove gems and replace them with rogue versions.1

The vulnerability, tracked as CVE-2022-29176, allowed anyone to pull certain gems and upload different files with the same name, version and different platforms.1

Exploitation required a gem with one or more dashes in its name, where the word before the dash was an attacker-controlled gem created within 30 days or with no updates for over 100 days.1

Who is affected

  • RubyGems.org gems with dashes in their names1

Is there a public exploit?

Not known None of the sources mentions public exploit code yet.

Exploited in the wild?

Not yet The maintainers found no evidence that the vulnerability was exploited in the wild.1

For bug hunters

The bug class is access control: a yank action that failed to verify ownership of a gem name. In bug bounty programmes, look for similar flaws in package registries, artifact repositories and any API that lets users delete or replace resources by name. Test whether you can remove or overwrite another user's package, especially when names contain separators or prefixes. Check for missing ownership checks on delete, update and transfer endpoints.

What to test

  • Try to yank or delete a gem you do not own via the API.
  • Upload a new version of a gem you do not own with the same name and version.
  • Test names with dashes where the prefix matches another user's gem.
  • Check whether ownership checks are enforced on all write endpoints.

The Access control lesson Every Access control report

Written by bugbounty.wiki with AI from its source. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.

Coverage

The article this story is based on. Each headline opens the outlet's own article.

  1. 1

Disclosed reports for RubyGems

View all

The newest public reports from its bug bounty program.

Reports about Access control

View all

Disclosed reports of the same bug class, clearest first.

More news

View all

Other stories from the last month, Access control first.