Rails Ruby on Rails
Ruby on Rails Directory Traversal Vulnerability
Directory traversal vulnerability in actionpack/lib/abstract_controller/base.rb in the implicit-render implementation in Ruby on Rails before 3.2.18, 4.0.x before 4.0.5, and 4.1.x before 4.1.1, when certain route globbing configurations are enabled, allows remote attackers to read arbitrary files via a crafted request.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 3.0.0, < 3.2.18
Fixed in 3.2.18
from GitHub Security Advisory GHSA-6x85-j5j2-27jx
- >= 4.0.0, < 4.0.5
Fixed in 4.0.5
from GitHub Security Advisory GHSA-6x85-j5j2-27jx
- >= 4.1.0, < 4.1.1
Fixed in 4.1.1
from GitHub Security Advisory GHSA-6x85-j5j2-27jx
Mitigation
Upgrade actionpack to 3.2.18 or later.
Upgrade actionpack to 4.0.5 or later.
Upgrade actionpack to 4.1.1 or later.
Timeline
Days relative to CVE publicationFirst public PoC 1.2 days after publication; added to CISA KEV 7.9 years after publication. First PoC: omarkurt/cve-2014-0130 (created 8 May 2014, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| omarkurt/cve-2014-0130 | 8 May 2014 +1.2 d | 18 | PoC
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoGET /api/%5C../%5C../%5C../%5C../%5C../{var}
- Seen in
- 1 repo: omarkurt/cve-2014-0130
- Evidence
- omarkurt/cve-2014-0130/README.rdoc:4 omarkurt/cve-2014-0130/config/routes.rb:3
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/%5C\.\./%5C\.\./%5C\.\./%5C\.\./%5C\.\./[^/?#]*(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2014-0130 Rails Ruby on Rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/%5C../%5C../%5C../%5C../%5C../"; reference:url,poc.griffinguard.io/cve/CVE-2014-0130; classtype:web-application-attack; sid:9738761; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Rails Ruby on Rails exploit attempt (CVE-2014-0130)
id: gg-pocmon-cve-2014-0130-9738761
status: experimental
description: Request pattern taken from public PoCs for CVE-2014-0130. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2014-0130
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/%5C../%5C../%5C../%5C../%5C../'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2014.0130