PoC Monitor
← All CVEs
CVE-2016-0752published 16 Feb 2016 02:00 UTCData: JSON · API

Rails Ruby on Rails

Ruby on Rails Directory Traversal Vulnerability

Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1, and 5.x before 5.0.0.beta1.1 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname.

First public PoC 20 days beforebefore publication · 26 Jan 2016
Public PoCs53 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS7.5high · scored by CISA ADP · CWE-22
CISA KEV 25 Mar 20226.1 years after publication

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

actionview (RubyGems)
  • >= 4.0.0, < 4.1.14.1

Fixed in 4.1.14.1

from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7

actionview (RubyGems)
  • >= 4.2.0, < 4.2.5.1

Fixed in 4.2.5.1

from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7

actionpack (RubyGems)
  • >= 4.0.0, < 4.1.14.1

Fixed in 4.1.14.1

from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7

actionpack (RubyGems)
  • >= 4.2.0, < 4.2.5.1

Fixed in 4.2.5.1

from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7

actionpack (RubyGems)
  • < 3.2.22.1

Fixed in 3.2.22.1

from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7

Mitigation

Upgrade actionview to 4.1.14.1 or later.

Upgrade actionview to 4.2.5.1 or later.

Upgrade actionpack to 4.1.14.1 or later.

Upgrade actionpack to 4.2.5.1 or later.

Upgrade actionpack to 3.2.22.1 or later.

Timeline

Days relative to CVE publication
t=0+1 y+2 y+3 y+4 y+5 y+6 yFirst public PoC26 Jan 2016 · t−20dCVE published16 Feb 2016 · t = 0Added to CISA KEV25 Mar 2022 · t+6.1y

First public PoC 20 days before publication; added to CISA KEV 6.1 years after publication. First PoC: forced-request/rails-rce-cve-2016-0752 (created 26 Jan 2016, found by us: backfilled).

PoC repositories

Found on GitHub.

3 PoCs

PoCs 3
RepositoryCreatedStarsAssessment
forced-request/rails-rce-cve-2016-0752 26 Jan 2016 −20 d 10 PoC
dachidahu/CVE-2016-0752 18 Mar 2016 +32 d 0 PoC
julianmunoz/Rails-Dynamic-Render-vuln 17 Apr 2016 +61 d 0 PoC

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.

PoC characteristics

What to hunt for in your logs · from 3 PoC repos

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

GET /users/{var}
(?i)^/users/[^/?#]*(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

GET /users/{var}
alert http any any -> $HOME_NET [80,3000] (msg:"GG PoC-Monitor CVE-2016-0752 Rails Ruby on Rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/users/"; reference:url,poc.griffinguard.io/cve/CVE-2016-0752; classtype:web-application-attack; sid:9788001; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

GET /users/{var}
title: Rails Ruby on Rails exploit attempt (CVE-2016-0752)
id: gg-pocmon-cve-2016-0752-9788001
status: experimental
description: Request pattern taken from public PoCs for CVE-2016-0752. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2016-0752
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/users/'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2016.0752