Magnolia — 1 vulnerability check

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

← All products · Feeds on GitHub

Magnolia CMS access bypass on installedModulesList

CVECVE-2013-4621
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/magnolia/CVE-2013-4621.yaml

Magnolia CMS before 4.5.9 serves its admin utility pages (module list, log viewer, configuration, JCR utilities) on the public instance to a user who is not an administrator.

The check first confirms a Magnolia instance by requesting /magnoliaPublic/.magnolia/pages/adminCentral.html and looking for the "Magnolia International Ltd" product markers. It then requests /magnoliaPublic/.magnolia/pages/installedModulesList.html anonymously, which must not return the module list, and posts the same page request with the demo account credentials eric/eric. The finding is raised when only the second request returns the "Installed modules" table. The probe only reads pages.

How noctis detects it

  1. HTTP(S) request GET /magnoliaPublic/.magnolia/pages/adminCentral.html
  2. HTTP(S) request GET /magnoliaPublic/.magnolia/pages/installedModulesList.html
  3. HTTP(S) request POST /magnoliaPublic/.magnolia/pages/installedModulesList.html with a crafted body
  4. Parses / computes the next value with a Rhai script
  5. Checks res.found for ^BYPASS$ → finding QoD 75: Access bypass: anonymous GET /magnoliaPublic/.magnolia/pages/installedModulesList.html returned HTTP … without the module list; the same pa…

References:

Feed source — tests/vulnerabilities/magnolia/CVE-2013-4621.yaml
# Magnolia CMS < 4.5.9 — access bypass on the public instance admin pages (CVE-2013-4621)
#
# On a vulnerable magnoliaPublic instance, a login as a low-privileged user (the demo
# account eric/eric) is enough to be served the admin utility pages such as
# /magnoliaPublic/.magnolia/pages/installedModulesList.html, while an anonymous request
# gets the login page. This feed requests the page anonymously first (control) and then
# with the demo credentials in the form body, and requires the module list only on the
# second request. Read-only: nothing is written on the target.
#
# Source plugin 2013/gb_magnolia_access_bypass_vuln.nasl (OID 1.3.6.1.4.1.25623.1.0.803679,
# GPL-2.0-only): fingerprint adminCentral.html (">Magnolia" + ">Magnolia International Ltd"),
# POST mgnlUserId=eric&mgnlUserPSWD=eric to installedModulesList.html, match
# "Installed modules" + "Name" + "Description". Improvement over the NASL: the anonymous
# control request must not already show the module list (a public page is not a bypass).
uid: 6d0f53a4-9b1e-4c79-8a7e-2c4d15b8e7f3
name: "Magnolia CMS access bypass on installedModulesList (CVE-2013-4621)"
description: |
  Magnolia CMS before 4.5.9 serves its admin utility pages (module list, log viewer,
  configuration, JCR utilities) on the public instance to a user who is not an
  administrator.

  The check first confirms a Magnolia instance by requesting
  /magnoliaPublic/.magnolia/pages/adminCentral.html and looking for the "Magnolia
  International Ltd" product markers. It then requests
  /magnoliaPublic/.magnolia/pages/installedModulesList.html anonymously, which must not
  return the module list, and posts the same page request with the demo account
  credentials eric/eric. The finding is raised when only the second request returns the
  "Installed modules" table. The probe only reads pages.
cves: [CVE-2013-4621]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [magnolia, cms, auth-bypass, access-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-4621"

steps:
  - id: init-admin
    action: set_var
    var_name: admin
    var_value: {status: 0, body: null}

  - id: init-anon
    action: set_var
    var_name: anon
    var_value: {status: 0, body: null}

  - id: init-login
    action: set_var
    var_name: login
    var_value: {status: 0, body: null}

  - id: fingerprint
    action: http_request
    method: GET
    port: "{{port}}"
    path: "/magnoliaPublic/.magnolia/pages/adminCentral.html"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: admin

  - id: anon-control
    action: http_request
    method: GET
    port: "{{port}}"
    path: "/magnoliaPublic/.magnolia/pages/installedModulesList.html"
    condition: "type_of(admin.body) == \"string\" && stridx(admin.body, \">Magnolia International Ltd\") >= 0"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: anon

  - id: low-priv-login
    action: http_request
    method: POST
    port: "{{port}}"
    path: "/magnoliaPublic/.magnolia/pages/installedModulesList.html"
    condition: "anon.status > 0 && type_of(anon.body) == \"string\" && stridx(anon.body, \"Installed modules\") < 0"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "mgnlUserId=eric&mgnlUserPSWD=eric"
    store_as: login

  - id: check
    action: script
    code: |
      let a = if type_of(anon.body) == "string" { anon.body } else { "" };
      let l = if type_of(login.body) == "string" { login.body } else { "" };
      let ok = anon.status > 0 && stridx(a, "Installed modules") < 0
        && login.status == 200 && stridx(l, "Installed modules") >= 0
        && stridx(l, "Name") >= 0 && stridx(l, "Description") >= 0;
      #{ ok: ok, found: if ok { "BYPASS" } else { "" } }
    store_as: res

  - id: report-bypass
    action: match
    source: res.found
    pattern: "^BYPASS$"
    condition: "res.ok"
    on_match:
      finding:
        cves: [CVE-2013-4621]
        confidence_delta: 0.45
        qod: 75
        evidence: "Access bypass: anonymous GET /magnoliaPublic/.magnolia/pages/installedModulesList.html returned HTTP {{anon.status}} without the module list; the same page with form login mgnlUserId=eric returned HTTP {{login.status}} with the Installed modules table"
      stop: true

View these feeds on GitHub