字号·· | 护眼
漏洞档案 · 高危

Ruby on Rails Action View 路径遍历 / 文件内容泄露(CVE-2019-5418)

CVE-2019-5418 别名:GHSA-86G5-2WH3-GC9J
CVSS 7.5 / 3.1 EPSS 98.5% CISA KEV 在野利用 公开 PoC · 11 Nuclei 模板
综合风险87/ 100
CVSS7.5高危
EPSS98.5%30 天利用概率
机构收录时间2019-03-27更新 2026-12-01

研判简报

概述

Rails 的 Action View 组件存在路径遍历漏洞(CWE-22):当应用代码使用 render file: 时,攻击者构造特殊的 Accept 请求头即可让服务器渲染目标系统上的任意文件,并返回文件内容。无需认证、无需交互,单次请求即可完成,泄露的可能是配置文件、凭据或密钥等敏感信息。使用受影响 Rails 版本、且存在 render file: 调用(参数可被外部间接影响)的 Web 应用方应重点关注。MITRE ATT&CK 对应 T1083(文件与目录发现)与 T1005(本地数据采集)。

严重性

CVSS 3.1 为 7.5(AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N),评级 high,综合风险分 86.7/100;EPSS 30 天利用概率 98.5%(百分位 99.9%,2026-11-24)。攻击面为暴露在网络的 Rails 应用 HTTP 入口,利用条件极低,属于“可自动化、易批量扫描”的类型。

利用状态

截至核查日期 2026-11-24:已收录 CISA KEV(2025-07-07),KEV 处置期限 2025-07-28;存在公开 Nuclei 检测模板(http/cves/2019/CVE-2019-5418.yaml,检测方式为在 Accept 头注入 ../ 序列匹配 /etc/passwd 特征);Exploit-DB 46585 等公开 PoC 共 11 条;CISA SSVC 评估为 automatable=yes、exploitation=active、technical_impact=partial。勒索软件关联情况:材料未给出。

受影响产品

厂商为 Rails / Ruby on Rails(https://github.com/rails/rails)。标题给出的受影响区间为低于 5.2.2.1、低于 5.1.6.2、低于 5.0.7.2、低于 4.2.11.1,以及 v3;涉及组件为 Action View,需与 render file: 调用组合触发。官方记录的“受影响”字段直接列出了 5.2.2.1、5.1.6.2、5.0.7.2、4.2.11.1 这四个版本号,与标题的“低于”语义存在出入;按漏洞公告语义,这些版本号应理解为修复版本门槛。具体部署形态:材料未给出。

修复版本

官方修复版本为 Rails 5.2.2.1、5.1.6.2、5.0.7.2、4.2.11.1(对应 4-2、5-0、5-1、5-2 稳定分支的修复发布)。v3 分支的具体修复版本:材料未给出。

缓解措施

厂商针对该漏洞的具体缓解步骤:材料未给出。KEV 要求动作原文为:按厂商说明应用缓解措施、对云服务遵循 BOD 22-01 指引,或在无可用缓解时停止使用该产品。其余替代动作材料未给出。

响应步骤

  1. 清点资产:确认 Rails 版本是否落在受影响区间(<5.2.2.1、<5.1.6.2、<5.0.7.2、<4.2.11.1 及 v3)。
  2. 代码排查:检索 render file: 调用点,判断传入路径是否可被外部输入间接影响,优先整改此类调用。
  3. 日志排查:检索请求头中包含 ../、/etc/passwd、../../../../ 等异常 Accept 值的访问记录,评估是否已被探测或利用。
  4. 授权自检:在获得授权的前提下使用 Nuclei 模板 http/cves/2019/CVE-2019-5418.yaml 验证暴露面。
  5. 升级处置:升级至 5.2.2.1 / 5.1.6.2 / 5.0.7.2 / 4.2.11.1 或更高版本;v3 用户按材料未给出明确版本,需另行确认。
  6. 若暂时无法升级:按 KEV 要求落实厂商缓解措施,无可用缓解时停止对外提供该服务,并记录例外与复评时间。

参考来源

  1. https://web.archive.org/web/20190313201629/https://weblog.rubyonrails.org/2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-released/kev
  2. https://nvd.nist.gov/vuln/detail/CVE-2019-5418kev
  3. https://www.exploit-db.com/exploits/46585exploit,exploitdb
  4. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2019/CVE-2019-5418.yamlexploit,nuclei
  5. https://www.exploit-db.com/exploits/46585/exploit,x_refsource_EXPLOIT-DB,exploit,x_refsource_EXPLOIT-DB,x_transferred,advi
  6. http://packetstormsecurity.com/files/152178/Rails-5.2.1-Arbitrary-File-Content-Disclosure.htmlx_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  7. http://www.openwall.com/lists/oss-security/2019/03/22/1mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  8. https://weblog.rubyonrails.org/2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-released/x_refsource_CONFIRM,x_refsource_CONFIRM,x_transferred,advisory,euvd
  9. https://groups.google.com/forum/#%21topic/rubyonrails-security/pFRKI96Sm8Qx_refsource_CONFIRM,x_refsource_CONFIRM,x_transferred,advisory,euvd
  10. https://lists.debian.org/debian-lts-announce/2019/03/msg00042.htmlmailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  11. https://access.redhat.com/errata/RHSA-2019:0796vendor-advisory,x_refsource_REDHAT,vendor-advisory,x_refsource_REDHAT,x_transfer
  12. http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00011.htmlvendor-advisory,x_refsource_SUSE,vendor-advisory,x_refsource_SUSE,x_transferred,
  13. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y43636TH4D6T46IC6N2RQVJTRFJAAYGA/vendor-advisory,x_refsource_FEDORA,vendor-advisory,x_refsource_FEDORA,x_transfer
  14. https://access.redhat.com/errata/RHSA-2019:1149vendor-advisory,x_refsource_REDHAT,vendor-advisory,x_refsource_REDHAT,x_transfer
  15. https://access.redhat.com/errata/RHSA-2019:1147vendor-advisory,x_refsource_REDHAT,vendor-advisory,x_refsource_REDHAT,x_transfer
  16. https://access.redhat.com/errata/RHSA-2019:1289vendor-advisory,x_refsource_REDHAT,vendor-advisory,x_refsource_REDHAT,x_transfer