CRE Loaded — 1 vulnerability check

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

← All products · Feeds on GitHub

CRE Loaded admin authentication bypass via PATH_INFO

CVECVE-2009-5076, CVE-2009-5077
Severityhigh · CVSS 7.5
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/cre-loaded/cre-loaded-admin-auth-bypass.yaml

CRE Loaded before 6.2.14 decides whether an admin page needs a login from the PHP_SELF variable, which includes PATH_INFO. Requesting admin/index.php/login.php (or password_forgotten.php) therefore returns the administration interface without authentication. This check first confirms that the plain admin page is protected and that a random sibling with the same suffix is not served, then requests admin/index.php/login.php and reports a finding only when it answers 200 with a CRE Loaded page title and no password field. The requests are read-only.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{cre_dir}}/admin/index.php
  3. HTTP(S) request GET {{cre_dir}}/admin/{{cre.sibling}}/login.php
  4. HTTP(S) request GET {{cre_dir}}/admin/index.php/login.php
  5. Checks probe.body for (?i)<title>[^<]*(Loaded|CRE)[^<]*</title> → finding QoD 75: …/admin/index.php/login.php returned the CRE Loaded admin page (HTTP …, no login form) while …/admin/index.php answered HTTP … and a random…

References:

Feed source — tests/vulnerabilities/cre-loaded/cre-loaded-admin-auth-bypass.yaml
# CRE Loaded < 6.2.14: unauthenticated admin access through PATH_INFO
# (CVE-2009-5076, CVE-2009-5077 — same PHP_SELF flaw, tracked by two IDs).
# Active detection ported from OpenVAS/Greenbone NASL
# 2011/gb_cre_loaded_mult_sec_bypass_vuln.nasl (GPL-2.0-only), which only
# compared the version banner against 6.4.0; this feed proves the bypass instead.
#
# Root cause: admin/includes/application_top.php (and the catalog one) skipped
# tep_admin_check_login() when basename($PHP_SELF) is login.php or
# password_forgotten.php, with $PHP_SELF = $_SERVER['PHP_SELF'] — which carries
# PATH_INFO. /admin/index.php/login.php therefore renders the admin dashboard
# with no session. Fixed releases set $PHP_SELF = $_SERVER['SCRIPT_NAME']
# (checked in the loadedcommerce/loaded6 source, v6.5.2).
#
# Detection (read-only, one GET per probe — nothing is written):
#   1. Control: <dir>/admin/index.php without PATH_INFO must NOT serve the
#      dashboard (3xx to the login page, or a 200 login form with a password
#      input). A host serving it freely is an open panel / catch-all, not this bug.
#   2. Control: a random sibling <dir>/admin/noctis<rand>.php/login.php must not
#      answer 200 (rejects catch-all front ends).
#   3. Probe: <dir>/admin/index.php/login.php (then /password_forgotten.php) must
#      answer 200 with a Loaded/CRE page title and no password input.
# Better than the NASL: no version-string guess (v([0-9.]+) also matches any
# number in the page) and no finding on a patched or merely version-banner host.
uid: 726349b8-825d-445b-b91a-e6b65ede353e
name: "CRE Loaded admin authentication bypass via PATH_INFO (CVE-2009-5076, CVE-2009-5077)"
description: |
  CRE Loaded before 6.2.14 decides whether an admin page needs a login from
  the PHP_SELF variable, which includes PATH_INFO. Requesting
  admin/index.php/login.php (or password_forgotten.php) therefore returns the
  administration interface without authentication. This check first confirms
  that the plain admin page is protected and that a random sibling with the
  same suffix is not served, then requests admin/index.php/login.php and
  reports a finding only when it answers 200 with a CRE Loaded page title and
  no password field. The requests are read-only.
cves: [CVE-2009-5076, CVE-2009-5077]
cvss: 7.5
severity: high
confidence_base: 0.30
category: auth-bypass
tags:
  - cre-loaded
  - oscommerce
  - auth-bypass
  - openvas-migrated
services:
  - http
  - https
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-5076"
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-5077"
  - "https://github.com/loadedcommerce/loaded6"
  - "OpenVAS/Greenbone NASL 2011/gb_cre_loaded_mult_sec_bypass_vuln.nasl (GPL-2.0-only)"

steps:
  - id: gen
    action: script
    code: |
      #{ sibling: "noctis" + rand_str(10) + ".php" }
    store_as: cre

  # Loop group: every step below runs once per candidate install dir.
  - id: init-ctrl
    action: set_var
    var_name: ctrl
    var_value: {status: 0, body: ""}
    loop:
      over: ["", "/cre", "/cre-loaded", "/catalog", "/store"]
      var: cre_dir

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

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

  - id: ctrl-plain
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{cre_dir}}/admin/index.php"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: ctrl

  - id: ctrl-sibling
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{cre_dir}}/admin/{{cre.sibling}}/login.php"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: rnd
    condition: "(ctrl.status >= 300 && ctrl.status < 400) || (ctrl.status == 200 && egrep(\"(?i)type\\\\s*=\\\\s*[\\\"']?password\", ctrl.body) != \"\")"

  - id: probe-login
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{cre_dir}}/admin/index.php/login.php"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: probe
    condition: "rnd.status != 200 && rnd.status != 0 && ((ctrl.status >= 300 && ctrl.status < 400) || (ctrl.status == 200 && egrep(\"(?i)type\\\\s*=\\\\s*[\\\"']?password\", ctrl.body) != \"\"))"

  - id: report
    action: match
    source: probe.body
    pattern: "(?i)<title>[^<]*(Loaded|CRE)[^<]*</title>"
    condition: "probe.status == 200 && egrep(\"(?i)type\\\\s*=\\\\s*[\\\"']?password\", probe.body) == \"\""
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "{{cre_dir}}/admin/index.php/login.php returned the CRE Loaded admin page (HTTP {{probe.status}}, no login form) while {{cre_dir}}/admin/index.php answered HTTP {{ctrl.status}} and a random sibling .php/login.php was not served."
      stop: true

View these feeds on GitHub