Skip to content

HackerOne

RubyGems

Every publicly disclosed report for RubyGems, what kind of bugs they were and what was paid.

disclosed reports
30
with a public bounty
6
median public bounty
$750
public bounties in all
$5,000
Scope, rewards and live status on bugbounty.fyi Accepting reports Disclosure program, no bounty 4 targets in scope

Disclosed reports

Newest first. Only what RubyGems chose to make public.

DoS

Server-side ReDoS via user-controlled regex in OIDC Access Policy

The OIDC Access Policy compiled user-supplied regular expressions with Ruby's Regexp engine and matched them against JWT claim values without any timeout or complexity check. A crafted pattern with catastrophic backtracking could tie up a Puma worker thread, and a few concurrent requests could exhaust the small thread pool and cause a denial of service.

RubyGems

Info disclosure

`/names.nsf` and all `/names*` files route to public API on rubygems.org

The reporter claims that a file named names.nsf is publicly accessible on rubygems.org without authentication, and that it contains confidential data. They assert an attacker could read sensitive information, but the text does not show what the file actually contains or that it is genuinely sensitive.

RubyGems

Informational
Open redirect

Host Header Attac

The application trusts the Forwarded header's host value, so an attacker can make it redirect users to an arbitrary domain. This enables phishing and potentially cache poisoning.

RubyGems

Medium
Info disclosure

Possibility to guess email address from gravatar image URL

The Gravatar image URL on rubygems.org is generated by taking the MD5 hash of the user's email address, which is deterministic and publicly visible. An attacker who can guess an email address can compute its MD5 hash and compare it to the hash in the Gravatar URL to confirm whether that email belongs to the user, even if the user has set their email to private.

RubyGems

Low
Path traversal $500

Delete directory using symlink when decompressing tar

When unpacking a gem, the code deletes the destination directory before checking that symlinks in the archive are safe. An attacker could craft a gem containing a symlink to an outside directory plus a path beneath it, causing an unrelated directory on the victim's machine to be deleted recursively.

RubyGems

Medium
Path traversal

Unpacker improperly validates symlinks, allowing gems writes to arbitrary locations

The RubyGems installer's check that a gem cannot write outside its install directory could be bypassed using a symbolic link inside a crafted gem. An attacker could then write a file with arbitrary name, contents and permissions to any location, potentially achieving code execution.

RubyGems

Medium
Misconfiguration $500

DNS SRV lookup of file:// sources enables local hijacking of gems

The gem command performs DNS SRV lookups for file:// sources and allows the SRV response to add a path prefix, so an attacker who can spoof DNS and write to a shared filesystem could make a victim install a malicious gem from an attacker-controlled location.

RubyGems

High
XSS

Cross-Domain JavaScript Source File Inclusion

The page loads a JavaScript file from a third-party domain, which means the third party's code runs with the page's privileges. If that third-party server were compromised or served malicious content, an attacker could execute script in the context of the affected site.

RubyGems

Low
RCE

Request Hijacking Vulnerability in RubyGems 2.6.13 and earlier

The api_endpoint function in RubyGems still returned the full DNS SRV response string after only checking its host part, so a malicious DNS response could carry URI syntax that changes how the value is read later. The reporter found no working exploit in the current code, but warned that future callers could be tricked into fetching a different path, possibly enabling a downgrade attack or swapping one gem for another.

RubyGems

Low
Business logic

65534 times efficient, Brute-force attack for api_key

The api_key parameter was not type-checked, so an attacker could supply an array of keys instead of a single string. This made the lookup query match any of the supplied keys at once, allowing many guesses per request, though the author judged the practical impact minimal.

RubyGems

Low
Crypto $1,000

Gem signature forgery

The gem package manager processes duplicate entries in a gem's tar container inconsistently: signature verification uses the last entry with a given name, while file extraction uses the first. An attacker can prepend a malicious data.tar.gz to a legitimately signed gem, so the forged gem installs arbitrary files while still passing signature checks under HighSecurity.

RubyGems

Medium
Path traversal

Installer can modify other gems if gem name is specially crafted

The RubyGems installer's path check used a prefix comparison that allowed a malicious gem to write outside its own installation directory. An attacker could overwrite or delete files of other installed gems whose names begin with the malicious gem's name, potentially leading to code execution.

RubyGems

Medium
XSS

[gem server] Stored XSS via crafted JavaScript URL inclusion in Gemspec

The homepage field of a Gemspec is rendered as a link in the built-in gem server web interface without validating the URL scheme, so a gem author can supply a javascript: URL. When a user clicks the [www] link for that gem, the attacker's script runs in the gem server's origin.

RubyGems

Medium
Open redirect

Host header Injection rubygems.org

The site did not validate the HTTP Host header, so a request with an arbitrary Host value was answered by the CDN with an error page or a redirect to the supplied domain. The reporter argues this could be abused for web-cache poisoning or password reset link manipulation, though no such exploit was demonstrated.

RubyGems

Low
RCE $1,500

Remote code execution on rubygems.org

The RubyGems.org application used unsafe YAML deserialization when parsing a gem's checksum file, allowing an attacker to escalate to remote code execution. An attacker could upload a malicious gem to execute arbitrary commands on the server.

RubyGems

Critical
DoS

No limit of summary length allows Denail of Service

The RubyGems repository does not limit the length of a gem's summary field. An attacker can publish a gem with an extremely large summary, causing the `gem search` command to hang or become unresponsive for users who search for a matching substring.

RubyGems

High
Path traversal $1,000

Installing a crafted gem package may create or overwrite files

The gem installer did not validate the name field in a gem's metadata, so a crafted gem could write files outside its own install directory. An attacker could create arbitrary files or overwrite an existing file such as another gem's executable, which would then run malicious code when invoked.

RubyGems

High
RCE

Request Hijacking Vulnerability in RubyGems 2.6.11 and earlier

The RubyGems client verifies DNS SRV responses for gem server API discovery insufficiently, allowing a man-in-the-middle attacker to poison the response and redirect the client to an attacker-controlled gem server. The attacker could then serve malicious gems, leading to remote code execution on the client machine.

RubyGems

High
RCE $500

Escape sequence injection in "summary" field

The gem summary field allows arbitrary escape sequences, which are printed to the terminal when a user queries gem details. An attacker could inject malicious escape sequences that may lead to arbitrary code execution in the victim's terminal.

RubyGems

Low
Subdomain takeover

Possible Subdomain Takeover at http://production.s3.rubygems.org/ pointing to Fastly

A DNS record for a RubyGems subdomain pointed to Fastly without a corresponding Fastly service being configured. The researcher reported it as a potential subdomain takeover risk, though the program stated that actual takeover was not possible because they control all subdomains of rubygems.org.

RubyGems

Informational
XSS

Invalid username updating

The edit page showed an invalid username in the top-right corner despite an error, temporarily, which could potentially allow harmful code.

RubyGems