CVE DatabaseCVE-2019-5418
한국어 권고문 →
CVE-2019-54187.5/HIGHCISA KEVCWE-22

Ruby on Rails Action View Arbitrary File Content Disclosure Vulnerability (CVE-2019-5418) Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
rubyonrails
Affected Components
actionview, rails
Published Date
2019-03-27
CVSS v3.1
7.5
HIGH
EPSS (30d)
98.5%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Ruby on Rails Action View versions prior to 5.2.2.1, 5.1.6.2, 5.0.7.2, 4.2.11.1, and all v3 versions

Impact

Unauthenticated remote attackers can exploit specially crafted Accept headers to read arbitrary files from the target system's filesystem, leading to sensitive data exposure

Mitigation

Immediately upgrade Ruby on Rails and Action View to the patched versions, or apply temporary web server filtering rules

Affected Products & Version Scope

Ruby on Rails Action View < 5.2.2.1, < 5.1.6.2, < 5.0.7.2, < 4.2.11.1, and v3

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your project's Gemfile to specify a secure version of Rails and Action View, then run bundler to apply the update.

bash
# Update Gemfile to secure versions
# gem 'rails', '>= 5.2.2.1'

# Execute dependency update
bundle update actionview rails

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, configure your reverse proxy (e.g., Nginx) to block requests containing directory traversal patterns in the Accept header.

nginx
# Block malicious Accept headers at the Nginx level
server {
    listen 80;
    server_name your-rails-app.com;

    if ($http_accept ~* '\.\./') {
        return 400 'Invalid Accept Header';
    }
}

3. Log Audit & IoC Verification Commands

Scan your web server access logs for potential exploitation attempts targeting the Accept header.

bash
# Search access logs for directory traversal patterns in headers
grep -i '\.\./' /var/log/nginx/access.log

# Verify the currently installed actionview version
bundle info actionview
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
Due to active exploitation in the wild (CISA KEV) and a high EPSS score, immediately audit and upgrade all Ruby on Rails deployments to patched versions.

Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds

Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2019-5418) is a directory traversal and file disclosure flaw in Action View, the template rendering component of the Ruby on Rails framework. Action View determines which template to render based on the format specified in the HTTP 'Accept' header. Due to insufficient validation and sanitization of this header input, the rendering engine directly processes user-supplied relative path sequences, allowing directory traversal attacks.

2. Exploitation Mechanics & Attack Scenario

An attacker can craft a malicious HTTP request containing directory traversal sequences (e.g., '../../') within the 'Accept' header. When Action View attempts to locate the template corresponding to the requested format, it resolves the path relative to the template directory. Because of the lack of input sanitization, the application traverses out of the intended directory and reads arbitrary files (such as 'Accept: ../../../../../etc/passwd{{'). The contents of the targeted file are then returned in the HTTP response body.

3. Infrastructure & Business Impact

With its inclusion in the CISA KEV catalog and an EPSS score of 0.9851 (98.51%), this vulnerability is actively and widely exploited in the wild. Successful exploitation allows attackers to retrieve highly sensitive files, including database credentials ('config/database.yml'), application secrets ('config/credentials.yml.enc'), and system configuration files. This exposure often serves as a stepping stone for full database compromise or remote code execution (RCE), posing a severe threat to business continuity.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2019-5418)

FAQ

Q1. How critical is CVE-2019-5418 and is it actively exploited in the wild?

CVE-2019-5418 is rated CVSS 7.5 (HIGH) with a 30-day EPSS exploitation probability of 98.5%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2019-5418?

Primary impacted vendors include rubyonrails across actionview, rails. Scope summary: Ruby on Rails Action View < 5.2.2.1, < 5.1.6.2, < 5.0.7.2, < 4.2.11.1, and v3

Q3. What temporary mitigations or workarounds exist for CVE-2019-5418 before patching?

[Mitigation] Immediately upgrade Ruby on Rails and Action View to the patched versions, or apply temporary web server filtering rules Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2019-5418

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (rubyonrails)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2019-5418 Ruby on Rails Action View Arbitrary File Content Disclosure Vulnerability (CVE-2019-5418) Analysis and Mitigation Guide (CVSS 7.5) - Patch & Workaround | CVE Pulse