HexBrain

RubyGems · Report #3938927

An organization admin can create an attacker-controlled organization owner via the gem transfer flow

Validstatus
highseverity
27upvotes
15 Oct 2026disclosed

Summary

An Organization admin on RubyGems.org can grant the Owner role, which is reserved for existing owners, by going through the gem transfer flow instead of the normal membership flow. The membership endpoints correctly stop admins from inviting owners: a direct owner invite returns 404, and adding a direct gem owner returns 403.

The transfer flow only checks that the user is an admin of the Organization. It then accepts whatever role is submitted for each invitee, including Owner, and creates the Organization membership without applying the owner-only rule. A previous fix enforced this rule on the direct membership route but did not extend it to gem transfers.

How it was found

The write-up for this report has not been downloaded yet, or the program disclosed it without one. Read it on HackerOne.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original