CVE-2019-5418 — actionview
HIGHCVE-2019-5418 is a high-severity (CVSS 7.5) Path Traversal vulnerability in actionview. It is in CISA's Known Exploited Vulnerabilities catalog (added 2025-07-07) — treat it as actively exploited and patch now. A fix is available for actionview — see the affected versions and patch details below.
Path Traversal in Action View
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2025-07-07. Federal agencies were required to remediate by 2025-07-28.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2019-5418.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2019-5418 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
actionview💎actionview💎actionview💎actionviewReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
File Content Disclosure in Action View
Impact
There is a possible file content disclosure vulnerability in Action View. Specially crafted accept headers in combination with calls to render file: can cause arbitrary files on the target server to be rendered, disclosing the file contents.
The impact is limited to calls to render which render file contents without a specified accept format. Impacted code in a controller looks something like this:
class UserController < ApplicationController
def index
render file: "#{Rails.root}/some/file"
end
end
Rendering templates as opposed to files is not impacted by this vulnerability.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The 6.0.0.beta3, 5.2.2.1, 5.1.6.2, 5.0.7.2, and 4.2.11.1 releases are available at the normal locations.
Workarounds
This vulnerability can be mitigated by specifying a format for file rendering, like this:
class UserController < ApplicationController
def index
render file: "#{Rails.root}/some/file", formats: [:html]
end
end
In summary, impacted calls to render look like this:
render file: "#{Rails.root}/some/file"
The vulnerability can be mitigated by changing to this:
render file: "#{Rails.root}/some/file", formats: [:html]
Other calls to render are not impacted.
Alternatively, the following monkey patch can be applied in an initializer:
$ cat config/initializers/formats_filter.rb
# frozen_string_literal: true
ActionDispatch::Request.prepend(Module.new do
def formats
super().select do |format|
format.symbol || format.ref == "*/*"
end
end
end)
Credits
Thanks to John Hawthorn [email protected] of GitHub
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | actionview | ≥ 5.2.0&&< 5.2.2.1 | 5.2.2.1bundle update actionview --conservative |
| 💎RubyGems | actionview | ≥ 4.0.0&&< 4.2.11.1 | 4.2.11.1bundle update actionview --conservative |
| 💎RubyGems | actionview | ≥ 5.1.0&&< 5.1.6.2 | 5.1.6.2bundle update actionview --conservative |
| 💎RubyGems | actionview | ≥ 5.0.0&&< 5.0.7.2 | 5.0.7.2bundle update actionview --conservative |
Affected Products
debian linuxdebianfedorafedoraprojectleapopensusecloudformsredhatsoftware collectionsredhatrailsrubyonrailsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Rails 5.2.1 - Arbitrary File Content Disclosure
by NotoriousRebel · Mar 21, 2019
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for actionview, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update actionview to 5.2.2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2019-5418 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
How to detect CVE-2019-5418
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2019-5418 -u https://target- Template
- Rails File Content Disclosure
- Severity
- high
- Impact
- This vulnerability can lead to unauthorized access to sensitive information stored on the server.
- Remediation
- Apply the patch provided by the Rails team or upgrade to a version that includes the fix.
Template by ProjectDiscovery nuclei-templates (omarkurt), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This issue did affect the versions of rh-ror42-rubygem-actionpack and rh-ror50-rubygem-actionpack as shipped with Red Hat Software Collections.
| Product | Fixed in | Advisory |
|---|---|---|
| CloudForms Management Engine 5.10 | ansible-tower-0:3.4.3-1.el7at | RHSA-2019:0796 |
| CloudForms Management Engine 5.9 | cfme-0:5.9.9.3-1.el7cf | RHSA-2019:1289 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ror50-rubygem-actionpack-1:5.0.1-2.el6 | RHSA-2019:1147 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ror42-rubygem-actionpack-1:4.2.6-5.el6 | RHSA-2019:1149 |
Frequently Asked Questions
Is CVE-2019-5418 in your dependencies?
Find it across RubyGems, including transitive dependencies.