Hunt prep
Before you test Ruby
What 77 disclosed reports say about Ruby: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing 14
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
ReDoS variants in other Ruby standard library parsers
Several reports show catastrophic backtracking in Ruby's own parsers (ipaddr, URI, Time.rfc2822, RDoc, WEBrick DigestAuth). Test other stdlib regex-based parsers that consume untrusted input, such as date and time parsing, cookie parsing and header parsing, with long runs of repeated characters to see whether any backtrack badly. The pattern of one fixed regex not covering sibling parsers is well established here.
-
2
CRLF injection in remaining header-setting paths
Smuggling / CRLF Read the lesson
Reports show CRLF injection fixed piecemeal in Net::HTTP header names, request paths, set_content_type, CGI::Cookie and WEBrick cookies. Test the other places where Ruby libraries build headers from caller-supplied values, such as redirect Location handling, multipart boundaries and cookie attributes, to see whether any still pass line breaks through. The history here is a series of partial fixes, so sibling sinks are worth checking.
Backed byHeader CRLF Injection in Ruby Net::HTTP (2023) Ruby:HTTP Header injection in 'net/http' (2017) 'net/http': HTTP Header Injection in the set_content_type method (2022)+3 more reports
From the lessons: Inject carriage return and line feed characters into a header value an...; Use a CRLF injection to inject arbitrary headers.; Use a CRLF injection to reach response splitting.; Ruby net/http, Net::HTTP and CGI library.; Use a CRLF injection to reach request smuggling.
-
3
Deserialisation sinks beyond YAML and XML-RPC
RDoc's YAML options file and xmlrpc's class field both allowed arbitrary object instantiation, and the JSON object-creation fix was incomplete. Test other Ruby tools and libraries that load configuration or data from untrusted files or network input with unsafe loaders, including JSON create hooks and Marshal paths in tooling. The recurring theme is a safe loader applied to one path but not its siblings.
-
4
Command injection via filenames in other Ruby tools
Filenames reaching open or shell calls caused command injection in un.rb, rdoc, Pathname, Shell and Rake::FileList. Test other Ruby tooling that processes project files, such as gem building, test runners and documentation generators, with filenames containing shell metacharacters. The same root cause keeps appearing across separate tools.
-
5
XSS in RDoc output beyond the fixed sanitiser
RDoc HTML generation had stored XSS in filenames, hyperlinks and templates, and the sanitiser fix was bypassed once already. Test other RDoc-rendered inputs such as method descriptions, include directives, table markup and search index content for unescaped output. The mutation-XSS report shows the earlier fix was narrow.
-
6
Path traversal and symlink handling in generators
Path traversal Read the lesson
RDoc followed symlinks out of the project and Tempfile mishandled traversal on Windows. Test other Ruby generators and temp-file helpers that resolve paths from project content, checking whether links or crafted names escape the intended directory. The symlink and traversal reports suggest path containment checks are inconsistent.
-
7
Null byte handling in path and matching functions
Access control Read the lesson
fnmatch, Dir methods and Unix socket paths all mishandled null bytes, letting patterns or paths be truncated. Test other Ruby path and matching APIs that take attacker-influenced strings, such as glob, File operations and socket paths, for the same truncation behaviour. This is a repeated class across separate functions.
-
8
Parser differentials in WEBrick request handling
Smuggling / CRLF Read the lesson
WEBrick's Transfer-Encoding check used a loose regex and its cookie handling allowed response splitting. Test other WEBrick request parsing decisions, such as Content-Length handling, header folding and chunked body termination, for disagreement with an upstream proxy. The smuggling report shows the parser is lenient in ways that matter behind a proxy.
Backed byPotential HTTP Request Smuggling in ruby webrick (2020) Response splitting vulnerability in WEBrick (2018) HTTP header can split /[\r\n]/ instead of /\r\n/ (2019)From the lessons: Front-end proxies and back-end servers that parse request boundaries d...; Send requests with conflicting Transfer-Encoding and Content-Length he...; Send a request with a multi-line Transfer-Encoding header and check wh...; Send header fields delimited with bare line feeds or other non-standar...
-
9
TLS certificate verification gaps in other Ruby clients
Net::SMTP checked only the hostname and IMAP had a StartTLS stripping issue. Test other Ruby standard library clients that offer TLS, such as Net::POP3, Net::FTP and Net::HTTP wrappers, for full chain verification and downgrade handling. The same verification shortcut may exist in sibling clients.
-
10
Resource exhaustion in numeric and big-number parsing
Rational parsing crashed the interpreter, bigdecimal sqrt looped excessively and FTP time parsing multiplied unbounded input. Test other numeric conversion paths that accept attacker strings, such as BigDecimal, Integer and Float parsing with extreme exponents or precision. The reports show numeric edge cases are under-tested.
-
11
SSRF filter bypass via resolver inconsistencies
Resolv.getaddresses returned empty for non-standard IP formats, bypassing blocklists. Test any Ruby-based URL fetching or validation that relies on this resolver, using alternative IP notations and redirects, to see whether private addresses slip past. The report shows the resolver and the filter can disagree.
Backed byResolv::getaddresses bug that can be abused to bypass security m... (2018) Attacker can smuggle a malicious domain in a URI object. (2022) Invalid URL parsing '#' (2018)From the lessons: URL parsers and HTTP clients that accept unusual characters.
-
12
URI parser edge cases affecting host validation
URI parsing mishandled fragments, four leading slashes and two hash characters. Test other unusual URI forms, such as backslashes, encoded separators and userinfo combinations, against code that validates hosts or builds redirects. The series of URI reports shows the parser's host extraction is fragile.
Backed byAttacker can smuggle a malicious domain in a URI object. (2022) Invalid URL parsing '#' (2018) URI parser's RFC3986 regular expression has poor performance whe... (2023)From the lessons: URL parsers and HTTP clients that accept unusual characters.; Send an X-Forwarded-Host header with an attacker-controlled value and...
-
13
Cloud storage exposure around Ruby CI assets
Misconfiguration Read the lesson
The Ruby CI S3 bucket was publicly listable and writable in several reports. Test other Ruby project infrastructure buckets and build artefact stores for public listing, write access and leaked logs. The earlier findings suggest CI storage permissions were not consistently reviewed.
-
14
Memory safety in string and pack functions with extreme lengths
Memory corruption Read the lesson
Heap overflows and over-reads appeared in tr_trans, sprintf, strscan and pack_unpack. Test other string and encoding functions with extreme lengths, multibyte encodings and precision values, watching for overflows or over-reads. Fixes here were applied function by function, so siblings may remain.
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 | 13 | 0 | – | – | $0 |
| DoS lesson | 13 | 0 | – | – | $0 |
| Memory corruption lesson | 11 | 0 | – | – | $0 |
| XSS lesson | 8 | 0 | – | – | $0 |
| Misconfiguration lesson | 6 | 0 | – | – | $0 |
| Path traversal lesson | 5 | 0 | – | – | $0 |
| Smuggling / CRLF lesson | 5 | 0 | – | – | $0 |
| Info disclosure lesson | 4 | 0 | – | – | $0 |
| Crypto lesson | 4 | 0 | – | – | $0 |
| SSRF lesson | 2 | 0 | – | – | $0 |
| Business logic lesson | 1 | 0 | – | – | $0 |
| Account takeover lesson | 1 | 0 | – | – | $0 |
| Open redirect 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.
-
DoS in bigdecimal's sqrt function due to miscalculation of loop iterations
The comparison was changed from less-than to greater-than so that the iteration count is capped at maxnr, and the fix was verified against the test suite.
Disclosed
-
XSS exploit of RDoc documentation generated by rdoc (CVE-2013-0256)
The paragraph text should be HTML-escaped before being written into the output, which the author shows produces escaped entities instead of live markup.
Disclosed
-
lib/net/ftp.rb: trusting PASV responses allow client abuse
The client could ignore the server-provided IP and reuse the control connection's IP, as curl does.
Disclosed
-
imap: StartTLS stripping attack (CVE-2016-0772).
The starttls method should raise an exception when the server does not respond with an OK tagged response.
Disclosed
-
Ruby OpenSSL Library - IV Reuse in GCM Mode
The documentation should clearly state the required order of setting the key and IV.
Disclosed
-
Net::SMTP with tls allows forged certificates as long as the hostname matches
Net::SMTP should validate certificates, with a parameter to disable validation for unauthenticated relaying.
Disclosed
-
Potential HTTP Request Smuggling in ruby webrick
The header should be parsed strictly so malformed values are not treated as chunked.
Disclosed
-
Variant of CVE-2013-0269 (Denial of Service and Unsafe Object Creation Vulnerability in JSON)
The issue was fixed in the master branch as part of an rb_scan_args commit, and the author recommends backporting the fix to Ruby 2.4, 2.5, and 2.6.
Disclosed
-
Ruby is shipping a vulnerable jQuery
Darkfish should be updated to a newer jQuery version, or removed if it cannot be maintained.
Disclosed
-
OpenSSL::X509::Name Equality Check Does Not Work, Patch included
The comparison function was patched to check for a positive result instead of a result greater than 1.
Disclosed
-
Response splitting vulnerability in WEBrick
The reporter attached a patch to fix the issue, but the text does not describe the patch.
Disclosed
-
controlled buffer under-read in pack_unpack_internal()
The length should be limited to positive values right after parsing, or negative lengths should be checked in all dangerous places in unpack().
Disclosed
-
NET::Ftp allows command injection in filenames
The library should use File.open instead of open to avoid command execution.
Disclosed
-
Ruby 2.3.x and 2.2.x still bundle DoS vulnerable verision of libYAML
The affected Ruby branches should bundle the fixed libYAML 0.1.7, as Ruby 2.4.x already does.
Disclosed
-
sprintf combined format string attack
The CHECK macro should raise an exception if the length is negative, and the return value of snprintf should be checked for errors before adding it to blen.
Disclosed