VulnarioBlogRails vulnerabilities

Rails Vulnerabilities: The 10 Most Critical Rails Security Bugs (CVEs)

Rails vulnerabilities are security flaws in Rails that attackers can abuse to steal data, take over a server or interrupt a service. Ruby on Rails is a full-stack web framework written in Ruby. The National Vulnerability Database (NVD) lists 121 CVEs for Rails, 6 of them rated critical, and 9 were published in the last 12 months. CISA lists 3 of them in its Known Exploited Vulnerabilities (KEV) catalog, which means attackers have used them against real systems.

This guide lists the 10 most critical Rails security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers Rails security basics, the current end-of-life dates and a free way to be told about the next Rails CVE as soon as it is published.

Key takeaways

  • 3 CVEs are in CISA's KEV catalog, so attackers have exploited them in the wild.
  • 6 Rails CVEs are rated critical (CVSS v3), and 9 new ones were published in the last 12 months.
  • The newest CVE in this guide is CVE-2026-33195, published Mar 24, 2026.
  • Supported Rails releases today (per endoflife.date): 8.1, 8.0. Releases not on the list are past their announced end of life.
  • You can monitor Rails for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these Rails CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 10 most critical Rails CVEs at a glance

Most critical Rails vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2019-54187.5 High2019-03-27Rails Ruby on Rails Path TraversalYes
2CVE-2016-07527.5 High2016-02-16Ruby on Rails Directory TraversalYes
3CVE-2014-01307.5 High2014-05-07Ruby on Rails Directory TraversalYes
4CVE-2026-331959.8 Critical2026-03-24Path traversalNo
5CVE-2024-281039.8 Critical2024-06-04Improper input validationNo
6CVE-2020-81659.8 Critical2020-06-19Insecure deserializationNo
7CVE-2019-54209.8 Critical2019-03-27Command injectionNo
8CVE-2009-24229.8 Critical2009-07-10Improper authenticationNo
9CVE-2026-332029.1 Critical2026-03-24InjectionNo
10CVE-2020-81638.8 High2020-07-02Code injectionNo

Each Rails CVE explained

1. CVE-2019-5418: Rails Ruby on Rails Path Traversal

  • CVSS 7.5 High
  • In CISA KEV (added 2025-07-07)
  • Published 2019-03-27
  • CWE-22
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality.
Affected versions
3.0.0 to before 4.2.11.1; 5.0.0 to before 5.0.7.2; 5.1.0 to before 5.1.6.2; 5.2.0 to before 5.2.2.1
What to do
Upgrade to the fixed release for your branch (4.2.11.1, 5.0.7.2, 5.1.6.2) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-5418 (opens in a new tab)

2. CVE-2016-0752: Ruby on Rails Directory Traversal

  • CVSS 7.5 High
  • In CISA KEV (added 2022-03-25)
  • Published 2016-02-16
  • CWE-22
What NVD says
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1, and 5.x before 5.0.0.beta1.1 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality.
Affected versions
before 3.2.22.1; 4.0.0 to before 4.1.14.1; 4.2.0 to before 4.2.5.1; 5.0.0
What to do
Upgrade to the fixed release for your branch (3.2.22.1, 4.1.14.1, 4.2.5.1) or a later one, then restart the service.

NVD record for CVE-2016-0752 (opens in a new tab)

3. CVE-2014-0130: Ruby on Rails Directory Traversal

  • CVSS 7.5 High
  • In CISA KEV (added 2022-03-25)
  • Published 2014-05-07
  • CWE-22
What NVD says
Directory traversal vulnerability in actionpack/lib/abstract_controller/base.rb in the implicit-render implementation in Ruby on Rails before 3.2.18, 4.0.x before 4.0.5, and 4.1.x before 4.1.1, when certain route globbing configurations are enabled, allows remote attackers to read arbitrary files via a crafted request.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality.
Affected versions
before 3.2.18; 4.0.0 to before 4.0.5; 4.1.0 to before 4.1.1
What to do
Upgrade to the fixed release for your branch (3.2.18, 4.0.5, 4.1.1) or a later one, then restart the service.

NVD record for CVE-2014-0130 (opens in a new tab)

4. CVE-2026-33195: Path traversal

  • CVSS 9.8 Critical
  • Published 2026-03-24
  • CWE-22
What NVD says
Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, Active Storage's `DiskService#path_for` does not validate that the resolved filesystem path remains within the storage root directory. If a blob key containing path traversal sequences (e.g. `../`) is used, it could allow reading, writing, or deleting arbitrary files on the server.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 7.2.3.1; 8.0.0 to before 8.0.4.1; 8.1.0 to before 8.1.2.1
What to do
Upgrade to the fixed release for your branch (7.2.3.1, 8.0.4.1, 8.1.2.1) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2026-33195 (opens in a new tab)

5. CVE-2024-28103: Improper input validation

  • CVSS 9.8 Critical
  • Published 2024-06-04
  • CWE-20
What NVD says
Action Pack is a framework for handling and responding to web requests. Since 6.1.0, the application configurable Permissions-Policy is only served on responses with an HTML related Content-Type. This vulnerability is fixed in 6.1.7.8, 7.0.8.2, and 7.1.3.3.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
6.1.0 to before 6.1.7.8; 7.0.0 to before 7.0.8.4; 7.1.0 to before 7.1.3.4; 7.2.0
What to do
Upgrade to the fixed release for your branch (6.1.7.8, 7.0.8.4, 7.1.3.4) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2024-28103 (opens in a new tab)

6. CVE-2020-8165: Insecure deserialization

  • CVSS 9.8 Critical
  • Published 2020-06-19
  • CWE-502
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 5.2.4.3; 6.0.0 to before 6.0.3.1
What to do
Upgrade to the fixed release for your branch (5.2.4.3, 6.0.3.1) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2020-8165 (opens in a new tab)

7. CVE-2019-5420: Command injection

  • CVSS 9.8 Critical
  • Published 2019-03-27
  • CWE-77
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 5.2.2.1; 6.0.0
What to do
Upgrade to 5.2.2.1 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-5420 (opens in a new tab)

8. CVE-2009-2422: Improper authentication

  • CVSS 9.8 Critical
  • Published 2009-07-10
  • CWE-287
What NVD says
The example code for the digest authentication functionality (http_authentication.rb) in Ruby on Rails before 2.3.3 defines an authenticate_or_request_with_http_digest block that returns nil instead of false when the user does not exist, which allows context-dependent attackers to bypass authentication for applications that are derived from this example by sending an invalid username without a password.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 2.3.3
What to do
Upgrade to 2.3.3 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2009-2422 (opens in a new tab)

9. CVE-2026-33202: Injection

  • CVSS 9.1 Critical
  • Published 2026-03-24
  • CWE-74
What NVD says
Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, Active Storage's `DiskService#delete_prefixed` passes blob keys directly to `Dir.glob` without escaping glob metacharacters.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on integrity and availability.
Affected versions
before 7.2.3.1; 8.0.0 to before 8.0.4.1; 8.1.0 to before 8.1.2.1
What to do
Upgrade to the fixed release for your branch (7.2.3.1, 8.0.4.1, 8.1.2.1) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2026-33202 (opens in a new tab)

10. CVE-2020-8163: Code injection

  • CVSS 8.8 High
  • Published 2020-07-02
  • CWE-94
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 5.0.1
What to do
Upgrade to 5.0.1 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2020-8163 (opens in a new tab)

Rails end of life: which versions still get security fixes

Running a release that still receives security fixes is the most effective way to avoid Rails vulnerabilities. After a release reaches end of life, newly published CVEs stay unpatched. As of Nov 3, 2026 the supported Rails releases are 8.1, 8.0.

Rails release support (source: endoflife.date, checked Nov 3, 2026)
ReleaseReleasedEnd of lifeLatestStatus
Rails 8.1Oct 22, 2025Oct 10, 20278.1.4Supported
Rails 8.0Nov 7, 2024Nov 7, 20268.0.5.1Supported
Rails 7.2Aug 9, 2024Aug 9, 20267.2.4End of life
Rails 7.1Oct 5, 2023Oct 1, 20257.1.6End of life
Rails 7.0Dec 15, 2021Apr 1, 20257.0.10End of life
Rails 6.1Dec 9, 2020Oct 1, 20246.1.7.10End of life
Rails 6.0Aug 16, 2019Jun 1, 20236.0.6.1End of life
Rails 5.2Apr 9, 2018Jun 1, 20225.2.8.1End of life

Dates come from endoflife.date (opens in a new tab), which tracks each project's own support policy. Confirm them with the vendor before planning an upgrade.

Rails security checklist

  1. Update the core, themes, plugins and extensions as soon as security releases appear.
  2. Remove plugins, themes and modules you do not use.
  3. Give users the minimum role they need and enable two-factor authentication for administrators.
  4. Keep debug and development modes off in production.
  5. Back up files and database before every update.
  6. Put a web application firewall and rate limiting in front of login pages.

Your stack is bigger than Rails. A flaw anywhere in the chain can be the way in, so also review our guides to Ruby vulnerabilities, PostgreSQL vulnerabilities and Redis vulnerabilities.

How to get alerted about new Rails vulnerabilities

NVD received 9 new Rails CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose Rails and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run Rails alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about Rails vulnerabilities

What are the most critical Rails vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical Rails CVEs include CVE-2019-5418 (CVSS 7.5), CVE-2016-0752 (CVSS 7.5), CVE-2014-0130 (CVSS 7.5). The guide above ranks the 10 most critical with affected versions and fixes.

Have Rails vulnerabilities been exploited in real attacks?

Yes. CISA's Known Exploited Vulnerabilities (KEV) catalog lists 3 Rails CVEs, including CVE-2019-5418, CVE-2016-0752, CVE-2014-0130. Treat these as the highest priority to patch.

How many vulnerabilities does Rails have?

As of Nov 3, 2026 the National Vulnerability Database lists 121 CVEs for Rails, with 6 rated critical by CVSS v3. 9 were published in the previous twelve months.

Which Rails versions are still supported?

As of Nov 3, 2026, endoflife.date lists these Rails releases as supported: 8.1, 8.0. Releases that are not listed are past their announced end of life.

How can I get alerted when a new Rails CVE is published?

Add Rails to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose Rails and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is Rails secure?

Rails is as secure as its patch level. NVD published 9 new Rails CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2019-5418?

CVE-2019-5418 is a high Rails vulnerability with a CVSS score of 7.5, published Mar 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.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.