Rails Ruby on Rails Path Traversal Vulnerability (CVE-2019-5418)
Published In CISA KEV since Sources: pwn.watch, OSV, CVE.org
What is affected, what to do
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.
The vulnerability is being actively exploited; treat it as a priority. Update rails to version 5.1.6.2. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- Rails Https://github.com/rails/rails
eq 5.2.2.1..5.2.2.1 - Rails Https://github.com/rails/rails
eq 5.1.6.2..5.1.6.2 - Rails Https://github.com/rails/rails
eq 5.0.7.2..5.0.7.2 - Rails Https://github.com/rails/rails
eq 4.2.11.1..4.2.11.1
- Rails Https://github.com/rails/rails
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
7.5
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
7.5
CVSS v3
Severity High on the scale from 0 to 10.
Source: pwn.watch, OSV, CVE.org
98.5 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.92
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 217.37 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 7.5 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 7.5
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 98.5 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.92
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · automatable · Technical impact: partial
- Source: CISA Vulnrichment, as of 17 July 2025
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-22
Response and mitigation
Why act now?
Prioritisation rationale
This bug is unauthenticated and network-reachable through a standard HTTP header, giving attackers extremely low cost of exploitation and making it a staple of mass internet scanning — hence the KEV listing and very high exploitation likelihood. The real impact is not the file read itself but the follow-on: config/secrets.yml, database.yml and cloud credentials become the pivot for full RCE or database takeover. Treat every internet-exposed Rails app as P1 — particularly legacy Rails 3/4 estates, Red Hat CloudForms, and outdated Debian/Fedora packages — and internal Rails instances behind VPN as P2 for the next patch window. After patching, mandatory secret rotation for anything that ever lived in the repo or config directory.
Runbook step 1
Immediate response (0-24 h)
- Inventory every Rails deployment and upgrade to a patched point release: 5.2.2.1, 5.1.6.2, 5.0.7.2 or 4.2.11.1. Rails 3.x is end-of-life — plan migration to a supported branch; in the meantime front it with a reverse proxy that strips malicious headers.
- Roll out
bundle update actionviewacross all environments (review the Gemfile.lock diff, do not rely onbundle installalone). Include CI runners, staging, DR and shadow copies — the flaw is pre-auth and often lingers on forgotten boxes. - Grep the codebase for
render file:calls that take user-controlled paths. Until patched, replace withrender template:/render :inline, or validate the path against a strict allowlist. - Harden the reverse proxy (nginx, HAProxy, Apache) to reject
Acceptheaders containing../, null bytes, or absurd MIME lengths. Example nginx:if ($http_accept ~* "\.\./") { return 400; }. - Enable a WAF virtual patch that blocks
Acceptheaders matching../../../or references to/etc/passwd,config/database.yml,config/secrets.yml,.env. Buys time until the Ruby fix is deployed. - After patching, rotate Rails secrets (
secret_key_base, DB credentials, keys fromcredentials.yml.enc, cloud tokens) if exfiltration cannot be ruled out — those are exactly the files this bug exposes.
Runbook step 2
Mitigation layers
- Network: pull Rails admin and backoffice instances off the public internet; expose only via VPN or zero-trust proxy. Front public apps with a CDN/WAF that normalises request headers.
- WAF/IPS: ModSecurity rule or equivalent signature targeting Accept-header payloads with traversal patterns. Snort/Suricata rule on HTTP request headers containing
../or encoded variants (%2e%2e%2f,..%2f). - Application layer: a Rails initializer that monkey-patches
render file:to constrain paths underRails.root.join('public')and raises on anything else. - Filesystem hardening: run the Rails process as a dedicated low-privilege user (
rails:rails), never root. Lock down/etc/passwd,/etc/shadow,~/.ssh/,.env,config/credentials.yml.encvia POSIX ACLs or an AppArmor/SELinux profile so the app user cannot read them. - Secrets handling: move credentials out of the repo and filesystem into an external secret store (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault). A disclosure then yields placeholders rather than live keys.
- Baseline monitoring: enforce egress filtering so a compromised host cannot stream exfiltrated files out over DNS or HTTPS.
Runbook step 3
Detection rules
- Filter web access logs for suspicious
Acceptheaders. Splunk/KQL shape:index=web http_header_accept IN ("*../*", "*%2e%2e%2f*", "*/etc/passwd*", "*database.yml*"). - Sigma shape:
detection: selection: cs-header-Accept|contains: ['../', '%2e%2e', 'etc/passwd', 'config/secrets', 'credentials.yml']. Log sourcewebserverorproxy. - Watch Rails
production.logforActionView::MissingTemplateexceptions correlated with template paths outsideapp/views/— often the first probing signal. - EDR/auditd telemetry: Rails process (
ruby,puma,unicorn) callingopen()/openat()on/etc/passwd,/proc/self/environ,~/.ssh/id_rsa. Auditd rule:-w /etc/passwd -p r -k rails_disclosure. - Network telemetry (Zeek
http.log): flag HTTP requests with anacceptfield longer than 512 bytes or containing traversal tokens; correlate with response size — large bodies on trivial GETs are suspicious.
- Filter web access logs for suspicious
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
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.
Source: pwn.watch, OSV (Open Source Vulnerabilities), cvelistv5, CISA KEV Catalog, NVD (NIST), CVE.org (MITRE)
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| Rails | https://github.com/rails/rails |
|
|
| redhat | cloudforms |
|
|
| redhat | software_collections |
|
|
| rubyonrails | rails |
|
|
| rubygems | actionview |
|
|
Vendors and products
Affected operating systems
| Linux | debian | debian_linux | 8.0 |
| Linux | opensuse | leap | 15.0 |
| Other | fedoraproject | fedora | 30 |
Weakness classes (CWE)
CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Base
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Entry at MITRE CWE-22
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| Packet Storm | Rails 5.2.1 Arbitrary File Content Disclosure (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| Exploit-DB | EDB-ID 46585 (opens in a new tab)exploit-db.com | PoC (publicly reported)reported, not verified | — |
| PoC-in-GitHub (nomi-sec) | rails-doubletap-py (opens in a new tab)github.com | PoC (publicly reported)reported, not verified | |
| PoC-in-GitHub (nomi-sec) | vulhub-rails-cve-2019-5418 (opens in a new tab)github.com | PoC (publicly reported)reported, not verified |
References & sources
- NVD (NIST)NVD: CVE-2019-5418advisory, pwn-watch
- access.redhat.comRHSA-2019:0796web, Vendor advisory, x_refsource_REDHAT
- access.redhat.comRHSA-2019:1147web, Vendor advisory, x_refsource_REDHAT
- access.redhat.comRHSA-2019:1149web, Vendor advisory, x_refsource_REDHAT
- access.redhat.comRHSA-2019:1289web, Vendor advisory, x_refsource_REDHAT
- groups.google.comforumweb
- groups.google.comforumweb
- groups.google.comforumweb, x_refsource_CONFIRM
- lists.debian.org[debian-lts-announce] 20190331 [SECURITY] [DLA 1739-1] rails security updateweb, Mailing list, x_refsource_MLIST
- lists.fedoraproject.orgarchives/list/package-announce@lists.fedoraproject.org/message/…web
- lists.fedoraproject.orgarchives/list/package-announce@lists.fedoraproject.org/message/…web
- web.archive.orgweb/20190313201629/https://weblog.rubyonrails.org/2019/3/13/Rai…web
- weblog.rubyonrails.org2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-releasedweb
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2019-5418web, government-resource
- exploit-db.comexploits/46585web
- lists.opensuse.orgopenSUSE-SU-2019:1344web, Vendor advisory, x_refsource_SUSE
- packetstormsecurity.comfiles/152178/Rails-5.2.1-Arbitrary-File-Content-Disclosure.htmlweb, x_refsource_MISC
- openwall.com[oss-security] 20190322 [CVE-2019-5418] Amendment: Possible Remote Code Execution Exploit in Action Viewweb, Mailing list, x_refsource_MLIST
- exploit-db.com46585Exploit, x_refsource_EXPLOIT-DB
- weblog.rubyonrails.org2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-releasedx_refsource_CONFIRM
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2019-5418"><img src="https://intel.neosec.eu/badge/cve/CVE-2019-5418.svg?lang=en" alt="CVE-2019-5418 – NEOSEC Intel" height="20"></a>