Ruby on Rails Ruby on Rails

Do you want an email whenever new security vulnerabilities are reported in any Ruby on Rails product?

Products by Ruby on Rails Sorted by Most Security Vulnerabilities since 2018

Ruby on Rails Rails24 vulnerabilities

Ruby on Rails Actionpack2 vulnerabilities

Ruby on Rails Actionview1 vulnerability

@rails Tweets

RT @siaw23: A new issue of This Week In Rails is out! https://t.co/hJmawwsvsd
Fri Sep 30 22:33:48 +0000 2022

RT @GregMolnar: This week in Rails is out! https://t.co/MRQI4rHScn
Fri Sep 23 12:07:17 +0000 2022

A new issue of This Week in Rails by @four54 is out. Handling reconnects in Action Cable, support for MySQL's --ss… https://t.co/2D9RrZKD6c
Sat Sep 17 12:32:02 +0000 2022

A new issue of This Week in Rails by @siaw23 is out: https://t.co/oNwdqVHEUL
Sat Sep 10 16:53:31 +0000 2022

Hi everyone! We've released Rails 7.0.4 https://t.co/edZE2TEEaH
Fri Sep 09 18:59:41 +0000 2022

By the Year

In 2022 there have been 7 vulnerabilities in Ruby on Rails with an average score of 6.6 out of ten. Last year Ruby on Rails had 9 security vulnerabilities published. At the current rates, it appears that the number of vulnerabilities last year and this year may equal out. Last year, the average CVE base score was greater by 0.15

Year Vulnerabilities Average Score
2022 7 6.57
2021 9 6.72
2020 10 7.30
2019 3 8.27
2018 3 6.70

It may take a day or so for new Ruby on Rails vulnerabilities to show up in the stats or in the list of recent security vulnerabilties. Additionally vulnerabilities may be tagged under a different product or component name.

Recent Ruby on Rails Security Vulnerabilities

# Possible XSS Vulnerability in Rails::Html::SanitizerThere is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer.This vulnerability has been assigned the CVE identifier CVE-2022-32209.Versions Affected: ALLNot affected: NONEFixed Versions: v1.4.3## ImpactA possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may

CVE-2022-32209 6.1 - Medium - June 24, 2022

# Possible XSS Vulnerability in Rails::Html::SanitizerThere is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer.This vulnerability has been assigned the CVE identifier CVE-2022-32209.Versions Affected: ALLNot affected: NONEFixed Versions: v1.4.3## ImpactA possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both `select` and `style` elements.Code is only impacted if allowed tags are being overridden. This may be done via application configuration:```ruby# In config/application.rbconfig.action_view.sanitized_allowed_tags = ["select", "style"]```see https://guides.rubyonrails.org/configuring.html#configuring-action-viewOr it may be done with a `:tags` option to the Action View helper `sanitize`:```<%= sanitize @comment.body, tags: ["select", "style"] %>```see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitizeOr it may be done with Rails::Html::SafeListSanitizer directly:```ruby# class-level optionRails::Html::SafeListSanitizer.allowed_tags = ["select", "style"]```or```ruby# instance-level optionRails::Html::SafeListSanitizer.new.sanitize(@article.body, tags: ["select", "style"])```All users overriding the allowed tags by any of the above mechanisms to include both "select" and "style" should either upgrade or use one of the workarounds immediately.## ReleasesThe FIXED releases are available at the normal locations.## WorkaroundsRemove either `select` or `style` from the overridden allowed tags.## CreditsThis vulnerability was responsibly reported by [windshock](https://hackerone.com/windshock?type=user).

XSS

A code injection vulnerability exists in the Active Storage >= v5.2.0

CVE-2022-21831 9.8 - Critical - May 26, 2022

A code injection vulnerability exists in the Active Storage >= v5.2.0 that could allow an attacker to execute code via image_processing arguments.

Code Injection

An XSS Vulnerability in Action Pack >= 5.2.0 and < 5.2.0

CVE-2022-22577 6.1 - Medium - May 26, 2022

An XSS Vulnerability in Action Pack >= 5.2.0 and < 5.2.0 that could allow an attacker to bypass CSP for non HTML like responses.

XSS

A XSS Vulnerability in Action View tag helpers >= 5.2.0 and < 5.2.0 which would

CVE-2022-27777 6.1 - Medium - May 26, 2022

A XSS Vulnerability in Action View tag helpers >= 5.2.0 and < 5.2.0 which would allow an attacker to inject content if able to control input into specific attributes.

XSS

Puma is a Ruby/Rack web server built for parallelism

CVE-2022-23634 5.9 - Medium - February 11, 2022

Puma is a Ruby/Rack web server built for parallelism. Prior to `puma` version `5.6.2`, `puma` may not always call `close` on the response body. Rails, prior to version `7.0.2.2`, depended on the response body being closed in order for its `CurrentAttributes` implementation to work correctly. The combination of these two behaviors (Puma not closing the body + Rails' Executor implementation) causes information leakage. This problem is fixed in Puma versions 5.6.2 and 4.3.11. This problem is fixed in Rails versions 7.02.2, 6.1.4.6, 6.0.4.6, and 5.2.6.2. Upgrading to a patched Rails _or_ Puma version fixes the vulnerability.

Information Disclosure

Action Pack is a framework for handling and responding to web requests

CVE-2022-23633 5.9 - Medium - February 11, 2022

Action Pack is a framework for handling and responding to web requests. Under certain circumstances response bodies will not be closed. In the event a response is *not* notified of a `close`, `ActionDispatch::Executor` will not know to reset thread local state for the next request. This can lead to data being leaked to subsequent requests.This has been fixed in Rails 7.0.2.1, 6.1.4.5, 6.0.4.5, and 5.2.6.1. Upgrading is highly recommended, but to work around this problem a middleware described in GHSA-wh98-p28r-vrc9 can be used.

Information Disclosure

A open redirect vulnerability exists in Action Pack >= 6.0.0

CVE-2021-44528 6.1 - Medium - January 10, 2022

A open redirect vulnerability exists in Action Pack >= 6.0.0 that could allow an attacker to craft a "X-Forwarded-Host" headers in combination with certain "allowed host" formats can cause the Host Authorization middleware in Action Pack to redirect users to a malicious website.

Open Redirect

A cross-site scripting vulnerability flaw was found in the auto_link function in Rails before version 3.0.6.

CVE-2011-1497 6.1 - Medium - October 19, 2021

A cross-site scripting vulnerability flaw was found in the auto_link function in Rails before version 3.0.6.

XSS

A possible open redirect vulnerability in the Host Authorization middleware in Action Pack >= 6.0.0

CVE-2021-22942 6.1 - Medium - October 18, 2021

A possible open redirect vulnerability in the Host Authorization middleware in Action Pack >= 6.0.0 that could allow attackers to redirect users to a malicious website.

Open Redirect

The actionpack ruby gem before 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 suffers

CVE-2021-22904 7.5 - High - June 11, 2021

The actionpack ruby gem before 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 suffers from a possible denial of service vulnerability in the Token Authentication logic in Action Controller due to a too permissive regular expression. Impacted code uses `authenticate_or_request_with_http_token` or `authenticate_with_http_token` for request authentication.

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers

CVE-2021-22902 7.5 - High - June 11, 2021

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

The actionpack ruby gem before 6.1.3.2 suffers from a possible open redirect vulnerability

CVE-2021-22903 6.1 - Medium - June 11, 2021

The actionpack ruby gem before 6.1.3.2 suffers from a possible open redirect vulnerability. Specially crafted Host headers in combination with certain "allowed host" formats can cause the Host Authorization middleware in Action Pack to redirect users to a malicious website. This is similar to CVE-2021-22881. Strings in config.hosts that do not have a leading dot are converted to regular expressions without proper escaping. This causes, for example, `config.hosts << "sub.example.com"` to permit a request with a Host header value of `sub-example.com`.

Open Redirect

A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the `redirect_to` or `polymorphic_url`helper with untrusted user input.

CVE-2021-22885 7.5 - High - May 27, 2021

A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the `redirect_to` or `polymorphic_url`helper with untrusted user input.

Generation of Error Message Containing Sensitive Information

The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers

CVE-2021-22880 7.5 - High - February 11, 2021

The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers from a regular expression denial of service (REDoS) vulnerability. Carefully crafted input can cause the input validation in the `money` type of the PostgreSQL adapter in Active Record to spend too much time in a regular expression, resulting in the potential for a DoS attack. This only impacts Rails applications that are using PostgreSQL along with money type columns that take user input.

Resource Exhaustion

The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability

CVE-2021-22881 6.1 - Medium - February 11, 2021

The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability. Specially crafted `Host` headers in combination with certain "allowed host" formats can cause the Host Authorization middleware in Action Pack to redirect users to a malicious website. Impacted applications will have allowed hosts with a leading dot. When an allowed host contains a leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.

Open Redirect

In actionpack gem >= 6.0.0, a possible XSS vulnerability exists when an application is running in development mode

CVE-2020-8264 6.1 - Medium - January 06, 2021

In actionpack gem >= 6.0.0, a possible XSS vulnerability exists when an application is running in development mode allowing an attacker to send or embed (in another page) a specially crafted URL which can allow the attacker to execute JavaScript in the context of the local application. This vulnerability is in the Actionable Exceptions middleware.

XSS

A CSRF forgery vulnerability exists in rails < 5.2.5, rails < 6.0.4

CVE-2020-8166 4.3 - Medium - July 02, 2020

A CSRF forgery vulnerability exists in rails < 5.2.5, rails < 6.0.4 that makes it possible for an attacker to, given a global CSRF token such as the one present in the authenticity_token meta tag, forge a per-form CSRF token.

Session Riding

A denial of service vulnerability exists in Rails <6.0.3.2

CVE-2020-8185 6.5 - Medium - July 02, 2020

A denial of service vulnerability exists in Rails <6.0.3.2 that allowed an untrusted user to run any pending migrations on a Rails app running in production.

Resource Exhaustion

The is a code injection vulnerability in versions of Rails prior to 5.0.1

CVE-2020-8163 8.8 - High - July 02, 2020

The is a code injection vulnerability in versions of Rails prior to 5.0.1 that wouldallow an attacker who controlled the `locals` argument of a `render` call to perform a RCE.

Code Injection

A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1

CVE-2020-8165 9.8 - Critical - June 19, 2020

A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1 that can allow an attacker to unmarshal user-provided objects in MemCacheStore and RedisCacheStore potentially resulting in an RCE.

Marshaling, Unmarshaling

A CSRF vulnerability exists in rails <= 6.0.3 rails-ujs module

CVE-2020-8167 6.5 - Medium - June 19, 2020

A CSRF vulnerability exists in rails <= 6.0.3 rails-ujs module that could allow attackers to send CSRF tokens to wrong domains.

Session Riding

A deserialization of untrusted data vulnerability exists in rails < 5.2.4.3, rails < 6.0.3.1 which can

CVE-2020-8164 7.5 - High - June 19, 2020

A deserialization of untrusted data vulnerability exists in rails < 5.2.4.3, rails < 6.0.3.1 which can allow an attacker to supply information can be inadvertently leaked fromStrong Parameters.

Marshaling, Unmarshaling

A client side enforcement of server side security vulnerability exists in rails < 5.2.4.2 and rails < 6.0.3.1 ActiveStorage's S3 adapter

CVE-2020-8162 7.5 - High - June 19, 2020

A client side enforcement of server side security vulnerability exists in rails < 5.2.4.2 and rails < 6.0.3.1 ActiveStorage's S3 adapter that allows the Content-Length of a direct file upload to be modified by an end user bypassing upload limits.

Unrestricted File Upload

There is a vulnerability in actionpack_page-caching gem < v1.2.1

CVE-2020-8159 9.8 - Critical - May 12, 2020

There is a vulnerability in actionpack_page-caching gem < v1.2.1 that allows an attacker to write arbitrary files to a web server, potentially resulting in remote code execution if the attacker can write unescaped ERB to a view.

Directory traversal

There is a possible information disclosure issue in Active Resource <v5.1.1

CVE-2020-8151 7.5 - High - May 12, 2020

There is a possible information disclosure issue in Active Resource <v5.1.1 that could allow an attacker to create specially crafted requests to access data in an unexpected way and possibly leak information.

AuthZ

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers

CVE-2020-5267 4.8 - Medium - March 19, 2020

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. The issue is fixed in versions 6.0.2.2 and 5.2.4.2.

XSS

There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted accept headers

CVE-2019-5418 7.5 - High - March 27, 2019

There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted accept headers can cause contents of arbitrary files on the target system's filesystem to be exposed.

Information Disclosure

A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can

CVE-2019-5420 9.8 - Critical - March 27, 2019

A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically generated development mode secret token. This secret token can be used in combination with other Rails internals to escalate to a remote code execution exploit.

Use of Insufficiently Random Values

There is a possible denial of service vulnerability in Action View (Rails) <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 where specially crafted accept headers

CVE-2019-5419 7.5 - High - March 27, 2019

There is a possible denial of service vulnerability in Action View (Rails) <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 where specially crafted accept headers can cause action view to consume 100% cpu and make the server unresponsive.

Resource Exhaustion

A bypass vulnerability in Active Storage >= 5.2.0 for Google Cloud Storage and Disk services

CVE-2018-16477 6.5 - Medium - November 30, 2018

A bypass vulnerability in Active Storage >= 5.2.0 for Google Cloud Storage and Disk services allow an attacker to modify the `content-disposition` and `content-type` parameters which can be used in with HTML files and have them executed inline. Additionally, if combined with other techniques such as cookie bombing and specially crafted AppCache manifests, an attacker can gain access to private signed URLs within a specific storage path. This vulnerability has been fixed in version 5.2.1.1.

A Broken Access Control vulnerability in Active Job versions >= 4.2.0 allows an attacker to craft user input which can cause Active Job to deserialize it using GlobalId and give them access to information

CVE-2018-16476 7.5 - High - November 30, 2018

A Broken Access Control vulnerability in Active Job versions >= 4.2.0 allows an attacker to craft user input which can cause Active Job to deserialize it using GlobalId and give them access to information that they should not have. This vulnerability has been fixed in versions 4.2.11, 5.0.7.1, 5.1.6.1, and 5.2.1.1.

Marshaling, Unmarshaling

There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby

CVE-2018-3741 6.1 - Medium - March 30, 2018

There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby. The gem allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments, and these attributes can lead to an XSS attack on target applications. This issue is similar to CVE-2018-8048 in Loofah. All users running an affected release should either upgrade or use one of the workarounds immediately.

XSS

Built by Foundeo Inc., with data from the National Vulnerability Database (NVD), Icons by Icons8. Privacy Policy. Use of this site is governed by the Legal Terms
Disclaimer
CONTENT ON THIS WEBSITE IS PROVIDED ON AN "AS IS" BASIS AND DOES NOT IMPLY ANY KIND OF GUARANTEE OR WARRANTY, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. YOUR USE OF THE INFORMATION ON THE DOCUMENT OR MATERIALS LINKED FROM THE DOCUMENT IS AT YOUR OWN RISK. Always check with your vendor for the most up to date, and accurate information.