Log1 CMS — 1 vulnerability check

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

← All products · Feeds on GitHub

Log1 CMS ajaxfilemanager PHP code injection exposure

CVECVE-2011-4825
Severityhigh
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/log1-cms/CVE-2011-4825.yaml

Log1 CMS 2.0 and earlier ship a vulnerable copy of the Ajax File and Image Manager (admin/libraries/ajaxfilemanager). Its ajax_create_folder.php handler stores request parameters in inc/data.php without escaping, which lets an unauthenticated attacker inject PHP code that runs on the next request to data.php.

This is a non-intrusive check: it fetches the front page (at / and under /cms) to recognise Log1 CMS, then requests the ajax_create_folder.php handler without any parameter and reports the finding when it answers 200. Nothing is written to the target.

How noctis detects it

  1. HTTP(S) request GET /index.php
  2. HTTP(S) request GET /cms/index.php
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET {{base.p}}/admin/libraries/ajaxfilemanager/ajax_create_folder.php
  5. Parses / computes the next value with a Rhai script
  6. Checks hit for true → finding QoD 70: Log1 CMS ajaxfilemanager code injection exposure (CVE-2011-4825)

References:

Feed source — tests/vulnerabilities/log1-cms/CVE-2011-4825.yaml
# Log1 CMS <= 2.0 — Ajax File and Image Manager static PHP code injection (CVE-2011-4825)
#
# The Ajax File and Image Manager bundled in Log1 CMS (admin/libraries/ajaxfilemanager)
# writes request parameters, unescaped, into inc/data.php through ajax_create_folder.php,
# so an unauthenticated POST plants PHP code that the next request to data.php runs.
# NVD has no v3 score for this CVE (v2 7.5), hence no `cvss:`.
#
# Detection (QoD 70, fingerprint only): proving the bug needs a persistent write to
# data.php (an upload/code-injection primitive), which a scanner must not do. The feed
# confirms the CMS from its pages ("Log1 CMS", at the web root or under /cms) and that the
# bundled vulnerable handler is installed and reachable without login. No parameter is sent.
#
# Source: OpenVAS/Greenbone NVT 2012/gb_log1_cms_50523.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103496, GPL-2.0-only). That NVT injects phpinfo() into
# data.php and reads it back, leaving the target modified; this feed never writes.
uid: 7a2057df-a03d-4155-bad2-459351ee897b
name: "Log1 CMS ajaxfilemanager PHP code injection exposure (CVE-2011-4825)"
description: |
  Log1 CMS 2.0 and earlier ship a vulnerable copy of the Ajax File and Image Manager
  (admin/libraries/ajaxfilemanager). Its ajax_create_folder.php handler stores request
  parameters in inc/data.php without escaping, which lets an unauthenticated attacker
  inject PHP code that runs on the next request to data.php.

  This is a non-intrusive check: it fetches the front page (at / and under /cms) to
  recognise Log1 CMS, then requests the ajax_create_folder.php handler without any
  parameter and reports the finding when it answers 200. Nothing is written to the target.
cves: [CVE-2011-4825]
severity: high
category: rce
confidence_base: 0.30
tags: [log1-cms, ajaxfilemanager, php, code-injection]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4825"
  - "https://www.securityfocus.com/bid/50523"

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

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

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

  - id: page-root
    action: http_request
    method: GET
    path: "/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: root

  - id: page-cms
    action: http_request
    method: GET
    path: "/cms/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: cms

  - id: pick-base
    action: script
    code: |
      if root.status == 200 && type_of(root.body) == "string" && root.body.contains("Log1 CMS") {
        #{ found: true, p: "" }
      } else if cms.status == 200 && type_of(cms.body) == "string" && cms.body.contains("Log1 CMS") {
        #{ found: true, p: "/cms" }
      } else {
        #{ found: false, p: "" }
      }
    store_as: base

  - id: handler
    action: http_request
    method: GET
    path: "{{base.p}}/admin/libraries/ajaxfilemanager/ajax_create_folder.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "base.found"
    store_as: af

  - id: handler-present
    action: script
    code: |
      base.found && af.status == 200
    store_as: hit

  - id: report
    action: match
    source: hit
    pattern: "true"
    condition: "hit"
    on_match:
      finding:
        title: "Log1 CMS ajaxfilemanager code injection exposure (CVE-2011-4825)"
        description: "Log1 CMS was recognised and its bundled ajaxfilemanager ajax_create_folder.php handler answers without authentication. In Log1 CMS up to 2.0 this handler writes request parameters unescaped into inc/data.php, letting an unauthenticated attacker run arbitrary PHP code. The check only fingerprints the handler; no code was injected."
        remediation: "Remove the bundled Ajax File and Image Manager or replace it with upstream release 1.1 or later, restrict /admin to trusted networks, and delete admin/libraries/ajaxfilemanager if unused."
        confidence_delta: 0.40
        qod: 70
        evidence: "Log1 CMS page found, GET {{base.p}}/admin/libraries/ajaxfilemanager/ajax_create_folder.php -> {{af.status}}"
      stop: true

View these feeds on GitHub