Skip to content

HackerOne

Ruby

Every publicly disclosed report for Ruby and what kind of bugs they were.

disclosed reports
77
most reported class
RCE
bug classes found
12
first disclosure
2013
Scope, rewards and live status on bugbounty.fyi Accepting reports Bounty not published 1 target in scope

Disclosed reports

Newest first. Only what Ruby chose to make public.

DoS

ReDoS in IPAddr

A regular expression in the Ruby ipaddr library used to validate a netmask prefix is vulnerable to catastrophic backtracking, so a crafted address string with a long run of digits causes the parser to hang. Because Rails parses the X-Forwarded-For header with this library, a single request with a long header value can tie up a server thread for tens of seconds.

Ruby

DoS

ReDoS in Psych

A regular expression used when parsing DateTime values in YAML is vulnerable to catastrophic backtracking. An attacker who can supply YAML for deserialisation could cause a denial of service by making the parser consume excessive CPU time.

Ruby

RCE

RCE by parsing `.rdoc_options` in RDoc

RDoc loads a project's .rdoc_options configuration file as YAML without restricting which Ruby classes can be instantiated, so a crafted file can trigger object injection. Running the rdoc command in a repository containing such a file causes arbitrary commands to run.

Ruby

Misconfiguration

The taint flag is not propagated at JSON.parse

Ruby's JSON.parse, JSON.parse! and JSON.load do not propagate the taint flag from the input string to the parsed objects, keys or values, unlike YAML and Marshal loading.

Ruby

DoS

DoS in bigdecimal's sqrt function due to miscalculation of loop iterations

The BigDecimal#sqrt method in Ruby's bigdecimal extension incorrectly used a maximum iteration constant as a lower bound, allowing an attacker-controlled precision argument to cause excessive loop iterations. An attacker who can control the argument could make a Ruby program hang for a long time, requiring SIGKILL to terminate.

Ruby

Medium
RCE

XMLRPC does not limit deserializable classes.

The Ruby xmlrpc library's parser restores arbitrary Ruby classes named in a '___class___' field of incoming XML, while only the serialiser side is limited to classes including XMLRPC::Marshallable. An attacker who can send crafted XML-RPC requests or responses can instantiate unintended classes and, depending on the application, may reach remote code execution through a gadget chain.

Ruby

High
DoS

RDoc::MethodAttr is vulnerable to Regular Expression Denial of Service (ReDoS)

A regular expression in RDoc's method attribute parser contains overlapping repeating groups, so certain crafted input triggers catastrophic backtracking. An attacker who can supply such a string to the block_params parser could make it consume 100% CPU for an extremely long time, causing denial of service.

Ruby

Low
Info disclosure

Arbitrary file injection via symlink attack in rdoc generator

The rdoc documentation generator follows symbolic links placed in the source directory, so a link pointing at a sensitive file causes that file's contents to be copied into the generated HTML and search index. An attacker who can place such a link could read files they otherwise lack permission to access, ranging from credentials to system configuration.

Ruby

Informational
XSS

XSS exploit of RDoc documentation generated by rdoc

RDoc did not escape file names when generating HTML documentation, so a file with a crafted name containing HTML and JavaScript was written unescaped into the generated index page. An attacker who can add such a file to a project could run script in the browser of anyone viewing the generated documentation.

Ruby

Medium
XSS

XSS exploit of RDoc documentation generated by rdoc (CVE-2013-0256)

RDoc's paragraph formatter inserted raw paragraph text into generated HTML without escaping, so a crafted documentation source file could inject script tags into the output. An attacker who could get a malicious file processed by rdoc could have arbitrary script run in the browser of anyone viewing the generated documentation.

Ruby

Medium
XSS

Stored XSS in RDoc hyperlinks through javascript scheme

The XSS filtering added to RDoc to fix an earlier report could be bypassed, so a crafted hyperlink using the javascript scheme survived into the generated HTML. An attacker who gets such a link into documentation could have script run when a reader clicks it.

Ruby

Medium
XSS

XSS in HTML generated by RDoc

RDoc's HTML generation does not escape input in several places, so script tags or event handlers can be injected into generated documentation and run when viewed.

Ruby

DoS

ReDoS in Time.rfc2822

The regular expression used by Time.rfc2822 to parse date strings has catastrophic backtracking, so a crafted date string with many trailing spaces makes parsing take an extremely long time. Because Rack::ConditionalGet parses the If-Modified-Since header with this method, an attacker could send a request that ties up a server thread, and Rails uses that middleware by default.

Ruby

Smuggling / CRLF

Header CRLF Injection in Ruby Net::HTTP

Ruby's Net::HTTP library does not validate header names, allowing CRLF injection when an attacker controls a header name. This lets an attacker inject arbitrary content into the HTTP request, potentially executing commands on internal services like Redis.

Ruby

Informational
Open redirect

Attacker can smuggle a malicious domain in a URI object.

Ruby's URI parser accepts a URI with four leading slashes and returns a nil host, but converting it back to a string yields a well-formed URL pointing to an attacker-controlled domain. An attacker could use this to bypass host validation and create open redirects for phishing.

Ruby

Smuggling / CRLF

CGI::Cookieクラスにおけるセキュリティ上好ましくない仕様および実装

The Ruby CGI::Cookie class does not validate the cookie name, path or domain values, so characters such as semicolons and line breaks pass through into the Set-Cookie header. If an application lets an attacker influence those values, the attacker could add extra cookie attributes, inject additional response headers or even inject content into the response body.

Ruby

Low
Smuggling / CRLF

'net/http': HTTP Header Injection in the set_content_type method

The Ruby net/http library's set_content_type method did not filter its parameters, so a newline in a parameter value could inject extra HTTP headers into the outgoing request. An attacker who controls such a value could alter the whole request, which in a web application could range from information disclosure to code execution.

Ruby

High
Misconfiguration

Bug Report : [ No Valid SPF Records ]

The reporter claims the domain lacks a strict SPF policy because its record ends in a soft-fail qualifier, which they say allows an attacker to send spoofed emails appearing to come from the organisation. The text itself shows the SPF record passed validation, so the practical claim is limited to possible email spoofing for phishing.

Ruby

High
RCE

OS Command Injection in 'rdoc' documentation generator

The rdoc documentation generator passed filenames to Ruby's open call without sanitising them, so a filename beginning with a pipe character was treated as a shell command. An attacker who could place a crafted file in a project could run arbitrary commands when rdoc processed the sources.

Ruby

Medium
SSRF

lib/net/ftp.rb: trusting PASV responses allow client abuse

The Ruby net/ftp library trusts the IP address and port in a PASV response, so a malicious FTP server can make the client connect to an arbitrary internal address and port. This allows port scanning and service banner extraction, especially when net/ftp processes a user-supplied URL.

Ruby

Low
Crypto

imap: StartTLS stripping attack (CVE-2016-0772).

The Ruby net/imap library's starttls method does not raise an error when the server rejects the STARTTLS command, allowing a man-in-the-middle attacker to strip the TLS upgrade and force the client to send credentials in plaintext.

Ruby

Medium
XSS

Code Injection Bug Report

The cache.ruby-lang.org website did not filter input, allowing an attacker to inject code into the page. This could let them spoof messages to users or redirect them to malicious sites.

Ruby

DoS

'net/ftp': Uncontrolled Resource Consumption (Memory/CPU)

The FTP time-value parser in Ruby's net/ftp library multiplies a user-supplied fractional-seconds string by a power of ten without bounding its length, so a malicious FTP server can send a timestamp with an enormous fractional part. This causes the client process to consume large amounts of memory and CPU, leading to denial of service.

Ruby

Medium
Business logic

Round-trip instability in REXML

REXML's XML parser and serialiser can change the structure of a document when it is parsed and then serialised again, so that a round-trip through REXML alters the document's meaning. An attacker could use this to tamper with XML-based protocols such as SAML, potentially bypassing authentication or access controls.

Ruby

Medium
Path traversal

Path traversal in Tempfile on windows OS due to unsanitized backslashes

The Tempfile library on Windows did not sanitise backslashes in the basename or extension arguments, allowing path traversal. An attacker who controls either argument could create files in arbitrary writable directories, potentially leading to remote code execution in Ruby on Rails applications.

Ruby

Medium