GHSL-2024-001_GHSL-2024-003: Remote DoS and potential authentication bypasses in RubyGems.org - CVE-2024-35221
A gem publisher could cause a remote denial of service by uploading a gem with YAML aliases that expand exponentially, exhausting worker processes. Additionally, under rare conditions where a provider's JWKS is nil, the system accepted JWTs with the 'none' algorithm, potentially allowing authentication bypass to publish gems.
A Remote DoS vulnerability and potential authentication bypasses were found in RubyGems.org, the project powering the Ruby community’s gem hosting service at rubygems.org.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
The DoS could occupy all workers and make the service unresponsive; the authentication bypasses were confirmed not exploitable on production but could allow gem publishing if JWKS is nil.
What the attacker needed
A valid API key for gem publishing; ability to send multiple requests; JWKS must be nil (for auth bypass)
The fix
The DoS was fixed by patching; hardening was put in place for the authentication bypasses.
How it was found
- Create and build a gem.
- Untar the built gem.
- Delete the metadata.gz file.
- Create a new metadata file containing YAML aliases that expand exponentially.
- Compress the metadata file with gzip.
- Update checksums and repackage the gem.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report describes two issues in RubyGems.org, a service for hosting Ruby libraries. One issue lets an attacker upload a specially crafted file that makes the server work so hard it stops responding to others. The other issue is a flaw in how the server checks digital tokens, which could let someone pretend to be a trusted publisher and upload malicious code, but only in rare situations.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.