BrowserCRM — 1 vulnerability check

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

← All products · Feeds on GitHub

BrowserCRM index.php PATH_INFO cross-site scripting

CVECVE-2011-5214
Severitymedium · CVSS 4.3
Categoryxss — XSS
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/browsercrm/CVE-2011-5214.yaml

BrowserCRM 5.100.01 and earlier, a web based CRM, prints the PATH_INFO of the request into its login page without HTML encoding, so a crafted link runs attacker script in the browser of a user who follows it, in the context of the CRM site.

Under the web root, /browserCRM, /browsercrm and /browser, this check first requires index.php to serve the BrowserCRM login page, then requests index.php with a script element carrying a random marker appended as extra path. The flaw is confirmed when the reply is again the BrowserCRM login page and returns the script element unescaped.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{d}}/index.php
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET {{d}}/index.php/{{sc.p}}
  5. Parses / computes the next value with a Rhai script
  6. Checks hit for /index\.php$ → finding QoD 75: BrowserCRM index.php PATH_INFO cross-site scripting (CVE-2011-5214)

References:

Feed source — tests/vulnerabilities/browsercrm/CVE-2011-5214.yaml
# BrowserCRM <= 5.100.01 — PATH_INFO reflected cross-site scripting in index.php (CVE-2011-5214).
#
# BrowserCRM's login page (index.php) prints the request's PATH_INFO into the
# page (the login form's action) without HTML encoding, so a request such as
# index.php/"><script>...</script> returns the script element verbatim. The
# same advisory lists further XSS vectors (admin_module_index.php,
# customise_calendar_times.php, login[] and framed parameters); the PATH_INFO
# of index.php is the one the product's login page always exposes.
#
# Detection (QoD 75): under the web root, /browserCRM, /browsercrm and /browser,
# index.php must answer 200 with the BrowserCRM login page (">BrowserCRM<" and
# "please log in"); it is then requested with
# index.php/"><script>alert(/noctis<random>/)</script> and the flaw is
# confirmed when the reply carries that script element verbatim and still is
# the BrowserCRM page. A server that echoes any URL cannot pass the product gate.
#
# CVE mapping: the issue also lists CVE-2011-5213 (SQL injection through
# login[username] of index.php and the Documents module parameters). No
# BrowserCRM source or reply format of its SQL error pages is available, so no
# behavioural SQL injection proof can be written without guessing; that CVE is
# not covered by this feed. CVSS: NVD v2 4.3 for CVE-2011-5214 (no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2012/gb_browsercrm_mult_sql_n_xss_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.902691, GPL-2.0-only). Differences: a random marker
# instead of the fixed alert(document.cookie) string, and the reflected marker
# must appear in a reply that is itself the BrowserCRM login page.
uid: 6bcd6d86-9c8a-45d9-be9e-3a0b53c76e3c
name: "BrowserCRM index.php PATH_INFO cross-site scripting (CVE-2011-5214)"
description: |
  BrowserCRM 5.100.01 and earlier, a web based CRM, prints the PATH_INFO of the
  request into its login page without HTML encoding, so a crafted link runs
  attacker script in the browser of a user who follows it, in the context of
  the CRM site.

  Under the web root, /browserCRM, /browsercrm and /browser, this check first
  requires index.php to serve the BrowserCRM login page, then requests
  index.php with a script element carrying a random marker appended as extra
  path. The flaw is confirmed when the reply is again the BrowserCRM login page
  and returns the script element unescaped.
cves: [CVE-2011-5214]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [browsercrm, crm, php, xss, reflected]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-5214"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-5213"

steps:
  - id: gen-marker
    action: script
    code: |
      let tok = "noctis" + rand_int(10000000, 99999999);
      #{ want: "<script>alert(/" + tok + "/)</script>",
         p: "%22%3E%3Cscript%3Ealert%28%2F" + tok + "%2F%29%3C%2Fscript%3E" }
    store_as: sc

  - id: init-hit
    action: set_var
    var_name: hit
    var_value: ""

  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      var: d
      over: ["", "/browserCRM", "/browsercrm", "/browser"]

  - id: init-r
    action: set_var
    var_name: r
    var_value: {status: 0, body: ""}

  - id: login-page
    action: http_request
    method: GET
    path: "{{d}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 5
    condition: 'hit == ""'
    store_as: page

  - id: is-browsercrm
    action: script
    condition: 'hit == ""'
    code: |
      let b = if type_of(page.body) == "string" { page.body } else { "" };
      page.status == 200 && b.contains(">BrowserCRM<") && b.contains("please log in")
    store_as: isbc

  - id: probe
    action: http_request
    method: GET
    path: "{{d}}/index.php/{{sc.p}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 5
    condition: 'hit == "" && isbc'
    store_as: r

  - id: check
    action: script
    condition: 'hit == "" && isbc'
    code: |
      let b = if type_of(r.body) == "string" { r.body } else { "" };
      if r.status == 200 && b.contains(sc.want) && b.contains(">BrowserCRM<") { d + "/index.php" } else { "" }
    store_as: hit

  - id: report
    action: match
    source: hit
    pattern: "/index\\.php$"
    condition: 'hit != ""'
    on_match:
      finding:
        title: "BrowserCRM index.php PATH_INFO cross-site scripting (CVE-2011-5214)"
        description: "BrowserCRM returned a script element appended to the path of index.php without HTML encoding: a crafted link runs attacker script in the browser of a CRM user who follows it, in the context of the CRM site, and can steal the user's session cookie."
        remediation: "Upgrade BrowserCRM to a release later than 5.100.01, which encodes the request path before printing it, or restrict access to the application."
        confidence_delta: 0.45
        qod: 75
        evidence: "{{hit}} returned {{sc.want}} unescaped in the BrowserCRM login page (HTTP {{r.status}})"
      stop: true

View these feeds on GitHub