# CVE-2019-5418: Rails Ruby on Rails Path Traversal

> Attackers can read arbitrary files on the server by sending specially crafted Accept headers in Ruby on Rails applications.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Yes, since 7 Jul 2025 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2019
- **Updated:** 21 Oct 2025
- **Also known as:** DEBIAN-CVE-2019-5418, GHSA-86g5-2wh3-gc9j, UBUNTU-CVE-2019-5418, USN-7646-1

## What is CVE-2019-5418?

CVE-2019-5418 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 27 Mar 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2019-5418?

8 open source packages ship an affected version, including actionview. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `actionview` | RubyGems | From 4.0.0 | 4.2.11.1 |
| `actionview` | RubyGems | From 4.0.0 | 4.2.11.1 |
| `actionview` | RubyGems | From 5.0.0 | 5.0.7.2 |
| `actionview` | RubyGems | From 5.0.0 | 5.0.7.2 |
| `actionview` | RubyGems | From 5.1.0 | 5.1.6.2 |
| `actionview` | RubyGems | From 5.1.0 | 5.1.6.2 |
| `actionview` | RubyGems | From 5.2.0 | 5.2.2.1 |
| `actionview` | RubyGems | From 5.2.0 | 5.2.2.1 |

Products: Debian Debian Linux, Fedoraproject Fedora, Opensuse Leap, Redhat Cloudforms, Redhat Software Collections, Rubyonrails Rails.

## How do I fix CVE-2019-5418?

Upgrade actionview to a fixed version for your release line: 4.2.11.1, 5.0.7.2, 5.1.6.2 or 5.2.2.1. US federal agencies must fix it by 28 Jul 2025.

## Is CVE-2019-5418 being exploited?

Yes. Attackers have exploited CVE-2019-5418 in the wild since at least 7 Jul 2025.

Public exploit code:

- CVE-2019-5418 - File Content Disclosure on Ruby on Rails (github_poc): https://github.com/mpgn/CVE-2019-5418
- RCE on Rails 5.2.2 using a path traversal (CVE-2019-5418) and a deserialization of Ruby objects (CVE-2019-5420) (github_poc): https://github.com/mpgn/Rails-doubletap-RCE
- A multi-threaded Golang scanner to identify Ruby endpoints vulnerable to CVE-2019-5418 (github_poc): https://github.com/brompwnie/CVE-2019-5418-Scanner
- File Content Disclosure on Rails Test Case - CVE-2019-5418 (github_poc): https://github.com/omarkurt/CVE-2019-5418
- https://github.com/random-robbie/CVE-2019-5418 (github_poc): https://github.com/random-robbie/CVE-2019-5418
- a demo for Ruby on Rails CVE-2019-5418 (github_poc): https://github.com/Bad3r/RailroadBandit

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-5418 and fix it if it is affected.

What it is: CVE-2019-5418 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 27 Mar 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2019-5418 in the wild since at least 7 Jul 2025.

Affected packages and fixed versions:
- actionview (RubyGems): affected from 4.0.0; fixed in 4.2.11.1
- actionview (RubyGems): affected from 4.0.0; fixed in 4.2.11.1
- actionview (RubyGems): affected from 5.0.0; fixed in 5.0.7.2
- actionview (RubyGems): affected from 5.0.0; fixed in 5.0.7.2
- actionview (RubyGems): affected from 5.1.0; fixed in 5.1.6.2
- actionview (RubyGems): affected from 5.1.0; fixed in 5.1.6.2
- actionview (RubyGems): affected from 5.2.0; fixed in 5.2.2.1
- actionview (RubyGems): affected from 5.2.0; fixed in 5.2.2.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-5418/ (Markdown: https://insights.sbomify.com/CVE-2019-5418/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-5418
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-5418
- OSV: https://osv.dev/vulnerability/CVE-2019-5418

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-5418/
Summaries are generated and may contain mistakes; the official description above is the record.
