Hunt prep
Before you test RubyGems
What 30 disclosed reports say about RubyGems: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 6
- median public bounty
- $750
- highest public bounty
- $1,500
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| RCE lesson | 6 | 2 | $1,000 | $1,500 | $2,000 |
| Path traversal lesson | 4 | 2 | $750 | $1,000 | $1,500 |
| Crypto lesson | 2 | 1 | $1,000 | $1,000 | $1,000 |
| Misconfiguration lesson | 1 | 1 | $500 | $500 | $500 |
| DoS lesson | 4 | 0 | – | – | $0 |
| XSS lesson | 3 | 0 | – | – | $0 |
| Info disclosure lesson | 3 | 0 | – | – | $0 |
| Open redirect lesson | 2 | 0 | – | – | $0 |
| Subdomain takeover lesson | 2 | 0 | – | – | $0 |
| Business logic lesson | 1 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Memory leak in gem decode logic can allow attacker to take down Rubygems.org application
The issue was fixed by restricting which instance variables can be set during metadata decoding.
Disclosed
-
Host Header Attac
The application should not trust client-supplied host values in the Forwarded header when building redirects.
Disclosed
-
Possibility to guess email address from gravatar image URL
The report suggests giving users the option to use Gravatar (with Gravatar as the default), but does not state that a fix was applied.
Disclosed
-
Dependency repository hijacking aka Repo Jacking from GitHub repo rubygems/bundler-site & rubygems/bundler.github.io + bundler.io docs
The documentation links should be updated to point to the correct repository owner.
Disclosed
-
Unpacker improperly validates symlinks, allowing gems writes to arbitrary locations
Symlinks that point outside the gem directory should again be disallowed.
Disclosed
-
DNS SRV lookup of file:// sources enables local hijacking of gems
The best solution is not to call api_endpoint for file:// and s3:// URLs, and a mitigation would be to apply stricter validation of SRV responses to prevent modification of components other than the host.
Disclosed
-
Cross-Domain JavaScript Source File Inclusion
JavaScript source files should be loaded only from trusted sources that end users cannot control.
Disclosed
-
Request Hijacking Vulnerability in RubyGems 2.6.13 and earlier
A patch was proposed that makes api_endpoint discard everything except the host after parsing the SRV response as a URI, and the reporter suggests simply disallowing any syntax other than hostname literals.
Disclosed
-
Gem signature forgery
The gem library should reject duplicate entries in the tar container or enforce a consistent policy for selecting entries during both verification and extraction.
Disclosed
-
Installer can modify other gems if gem name is specially crafted
The fix is to append a directory separator to the destination directory before the prefix check.
Disclosed
-
Host header Injection rubygems.org
The edge should reject or normalise requests whose Host header does not match the legitimate domain, and applications should not build links from the raw Host value.
Disclosed
-
Remote code execution on rubygems.org
The checksum file should not be parsed with YAML.load on untrusted data.
Disclosed
-
Request Hijacking Vulnerability in RubyGems 2.6.11 and earlier
The report suggests a patch to also reject targets containing a slash, and recommends moving API discovery away from DNS to HTTPS.
Disclosed
-
Possible Subdomain Takeover at http://production.s3.rubygems.org/ pointing to Fastly
The DNS record was removed because it was no longer needed.
Disclosed