Valarsoft Webmatic — 2 vulnerability checks

noctis ships 2 vulnerability checks for Valarsoft Webmatic, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Valarsoft Webmatic < 3.0.3 multiple SQL injection

CVECVE-2009-4380
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/valarsoft-webmatic/CVE-2009-4380.yaml

Valarsoft Webmatic before 3.0.3 builds SQL queries from request input that is not sanitised, which lets an unauthenticated attacker run arbitrary SQL against the site's database. The affected pages and parameters were never published, so no request can prove the injection; this check identifies the version instead.

On the web root and the usual install paths (/webmatic, /web) it requests index.php and accepts the page as Webmatic when it carries the "Powered by: Webmatic X.Y" footer link or the default "Welcome to Webmatic" home page title with a version number. It reports a version lower than 3.0.3, with a lower confidence than an exploit proof.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/index.php
  2. Parses / computes the next value with a Rhai script
  3. Checks hit for Valarsoft Webmatic → finding QoD 70: Valarsoft Webmatic < 3.0.3 multiple SQL injection (CVE-2009-4380)

References:

Feed source — tests/vulnerabilities/valarsoft-webmatic/CVE-2009-4380.yaml
# Valarsoft Webmatic before 3.0.3 — multiple SQL injection flaws, CVE-2009-4380
# (unspecified vectors; the XSS flaws fixed by the same release are
# CVE-2009-4379, see CVE-2009-4379.yaml next to this file).
#
# Why version only (QoD 70): neither the CVE record, the vendor note (Webmatic
# 3.0.3 release news) nor Secunia SA37735 / BID 37335 names a page or a
# parameter, and the Webmatic sources are not published, so there is no request
# that could prove the injection. The check reads the version Webmatic prints
# on its home page.
#
# Real page forms used:
#   - footer link `<a href="http://www.valarsoft.com" TARGET="NEW">Powered by:
#     Webmatic X.Y</a>` (WhatWeb webmatic.rb plugin; the 1.9 form with
#     href="http://www.webmatic.tk" is quoted in the old Nessus
#     webmatic_unknown_flaw.nasl);
#   - default home page title "Welcome to Webmatic" (the stock "title" setting,
#     seen in the HTB22568 advisory PoC).
#
# Ported from OpenVAS/Greenbone NVT `2009/gb_vsoft_webmatic_xss_n_sql_inj_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.901088, GPL-2.0-only) and its detection
# `secpod_valarsoft_webmatic_detect.nasl` (GET <dir>/index.php for /, /webmatic,
# /web; requires a 200 with "Welcome to Webmatic"; version from the first
# "Webmatic ([0-9.]+)"; reports version < 3.0.3).
# Differences from the NASL:
#   - also identifies a site whose owner changed the default title, from the
#     "Powered by: Webmatic X.Y" footer link (the NASL misses those);
#   - the version is taken from that footer link first, and the fallback needs
#     a dotted version ("Webmatic 3.0.2"), so a bare "Webmatic 3" or a stray
#     number elsewhere in the page is not read as the version; formatting tags
#     inside the footer link (<font>…) are allowed;
#   - the comparison is numeric per component (3.0.10 is not read as < 3.0.3).
#
# CVSS: NVD carries only a CVSS v2 score (7.5, AV:N/AC:L/Au:N/C:P/I:P/A:P).
uid: 0608a47f-fce8-4275-b5e5-7cf27b61a60f
name: "Valarsoft Webmatic < 3.0.3 multiple SQL injection (CVE-2009-4380)"
description: |
  Valarsoft Webmatic before 3.0.3 builds SQL queries from request input that is
  not sanitised, which lets an unauthenticated attacker run arbitrary SQL
  against the site's database. The affected pages and parameters were never
  published, so no request can prove the injection; this check identifies the
  version instead.

  On the web root and the usual install paths (/webmatic, /web) it requests
  index.php and accepts the page as Webmatic when it carries the
  "Powered by: Webmatic X.Y" footer link or the default "Welcome to Webmatic"
  home page title with a version number. It reports a version lower than
  3.0.3, with a lower confidence than an exploit proof.
cves: [CVE-2009-4380]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [valarsoft, webmatic, cms, php, sqli, version-check]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-4380"
  - "http://secunia.com/advisories/37735"
  - "http://www.securityfocus.com/bid/37335"
  - "http://www.valarsoft.com/index.php?stage=0&section=5&newsID=165&action=6"

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

  # ── Per candidate install path (loop group) ───────────────────────────────
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/webmatic", "/web"]

  - id: fetch-home
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == ""'
    store_as: page

  # Product gate + version: the "Powered by: Webmatic X.Y" footer link first,
  # else the default "Welcome to Webmatic" title with a dotted version.
  # Reports version < 3.0.3 (numeric per component).
  - id: check-version
    action: script
    condition: 'hit == ""'
    code: |
      let b = if type_of(page.body) == "string" { page.body } else { "" };
      let ver = "";
      let how = "";
      if page.status == 200 {
        let f = eregmatch("(?i)<a\\s[^>]*href=[^>]*>(?:\\s*<[^>]+>)*\\s*Powered by:\\s*Webmatic\\s+([0-9]{1,6}(?:\\.[0-9]{1,6})*)", b);
        if type_of(f) == "array" && f.len() > 1 {
          ver = f[1];
          how = "\"Powered by: Webmatic " + f[1] + "\" footer link";
        } else if b.contains("Welcome to Webmatic") {
          let t = eregmatch("Webmatic ([0-9]{1,6}\\.[0-9]{1,6}(?:\\.[0-9]{1,6})*)", b);
          if type_of(t) == "array" && t.len() > 1 {
            ver = t[1];
            how = "\"Welcome to Webmatic\" home page, \"Webmatic " + t[1] + "\"";
          }
        }
      }
      let out = "";
      if ver != "" {
        let p = split(ver, ".");
        let a = int(p[0]);
        let m = if p.len() > 1 { int(p[1]) } else { 0 };
        let c = if p.len() > 2 { int(p[2]) } else { 0 };
        if a * 1000000 + m * 1000 + c < 3000003 {
          out = dir + "/index.php runs Valarsoft Webmatic " + ver + " (" + how + ")";
        }
      }
      out
    store_as: hit

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit
    pattern: "Valarsoft Webmatic"
    on_match:
      finding:
        title: "Valarsoft Webmatic < 3.0.3 multiple SQL injection (CVE-2009-4380)"
        description: "The site runs Valarsoft Webmatic older than 3.0.3. These releases pass request input to SQL queries without sanitising it, so an unauthenticated attacker can run arbitrary SQL against the site's database. Detected from the version only; the affected parameters were never published."
        remediation: "Upgrade Valarsoft Webmatic to 3.0.3 or later."
        confidence_delta: 0.45
        qod: 70
        evidence: "{{hit}}; fixed in 3.0.3"
      stop: true

Valarsoft Webmatic < 3.0.3 multiple cross-site scripting

CVECVE-2009-4379
Severitymedium · CVSS 4.3
Categoryxss — XSS
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/valarsoft-webmatic/CVE-2009-4379.yaml

Valarsoft Webmatic before 3.0.3 returns request input to the browser without sanitising it, which lets an attacker run script in a victim's browser in the context of the site (cross-site scripting). The affected pages and parameters were never published, so no request can prove the flaw; this check identifies the version instead.

On the web root and the usual install paths (/webmatic, /web) it requests index.php and accepts the page as Webmatic when it carries the "Powered by: Webmatic X.Y" footer link or the default "Welcome to Webmatic" home page title with a version number. It reports a version lower than 3.0.3, with a lower confidence than an exploit proof.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/index.php
  2. Parses / computes the next value with a Rhai script
  3. Checks hit for Valarsoft Webmatic → finding QoD 70: Valarsoft Webmatic < 3.0.3 multiple cross-site scripting (CVE-2009-4379)

References:

Feed source — tests/vulnerabilities/valarsoft-webmatic/CVE-2009-4379.yaml
# Valarsoft Webmatic before 3.0.3 — multiple cross-site scripting flaws,
# CVE-2009-4379 (unspecified vectors; the SQL injection flaws fixed by the same
# release are CVE-2009-4380, see CVE-2009-4380.yaml next to this file).
#
# Why version only (QoD 70): neither the CVE record, the vendor note (Webmatic
# 3.0.3 release news) nor Secunia SA37735 / BID 37335 names a page or a
# parameter, and the Webmatic sources are not published, so there is no request
# that could prove the cross-site scripting. The check reads the version Webmatic prints
# on its home page.
#
# Real page forms used:
#   - footer link `<a href="http://www.valarsoft.com" TARGET="NEW">Powered by:
#     Webmatic X.Y</a>` (WhatWeb webmatic.rb plugin; the 1.9 form with
#     href="http://www.webmatic.tk" is quoted in the old Nessus
#     webmatic_unknown_flaw.nasl);
#   - default home page title "Welcome to Webmatic" (the stock "title" setting,
#     seen in the HTB22568 advisory PoC).
#
# Ported from OpenVAS/Greenbone NVT `2009/gb_vsoft_webmatic_xss_n_sql_inj_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.901088, GPL-2.0-only) and its detection
# `secpod_valarsoft_webmatic_detect.nasl` (GET <dir>/index.php for /, /webmatic,
# /web; requires a 200 with "Welcome to Webmatic"; version from the first
# "Webmatic ([0-9.]+)"; reports version < 3.0.3).
# Differences from the NASL:
#   - also identifies a site whose owner changed the default title, from the
#     "Powered by: Webmatic X.Y" footer link (the NASL misses those);
#   - the version is taken from that footer link first, and the fallback needs
#     a dotted version ("Webmatic 3.0.2"), so a bare "Webmatic 3" or a stray
#     number elsewhere in the page is not read as the version; formatting tags
#     inside the footer link (<font>…) are allowed;
#   - the comparison is numeric per component (3.0.10 is not read as < 3.0.3).
#
# CVSS: NVD carries only a CVSS v2 score (4.3, AV:N/AC:M/Au:N/C:N/I:P/A:N).
uid: ff1dd9dd-2e70-4d2a-9e4b-71c452cd1948
name: "Valarsoft Webmatic < 3.0.3 multiple cross-site scripting (CVE-2009-4379)"
description: |
  Valarsoft Webmatic before 3.0.3 returns request input to the browser without
  sanitising it, which lets an attacker run script in a victim's browser in the
  context of the site (cross-site scripting). The affected pages and parameters
  were never published, so no request can prove the flaw; this check
  identifies the version instead.

  On the web root and the usual install paths (/webmatic, /web) it requests
  index.php and accepts the page as Webmatic when it carries the
  "Powered by: Webmatic X.Y" footer link or the default "Welcome to Webmatic"
  home page title with a version number. It reports a version lower than
  3.0.3, with a lower confidence than an exploit proof.
cves: [CVE-2009-4379]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [valarsoft, webmatic, cms, php, xss, version-check]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2009-4379"
  - "http://secunia.com/advisories/37735"
  - "http://www.securityfocus.com/bid/37335"
  - "http://www.valarsoft.com/index.php?stage=0&section=5&newsID=165&action=6"

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

  # ── Per candidate install path (loop group) ───────────────────────────────
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/webmatic", "/web"]

  - id: fetch-home
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit == ""'
    store_as: page

  # Product gate + version: the "Powered by: Webmatic X.Y" footer link first,
  # else the default "Welcome to Webmatic" title with a dotted version.
  # Reports version < 3.0.3 (numeric per component).
  - id: check-version
    action: script
    condition: 'hit == ""'
    code: |
      let b = if type_of(page.body) == "string" { page.body } else { "" };
      let ver = "";
      let how = "";
      if page.status == 200 {
        let f = eregmatch("(?i)<a\\s[^>]*href=[^>]*>(?:\\s*<[^>]+>)*\\s*Powered by:\\s*Webmatic\\s+([0-9]{1,6}(?:\\.[0-9]{1,6})*)", b);
        if type_of(f) == "array" && f.len() > 1 {
          ver = f[1];
          how = "\"Powered by: Webmatic " + f[1] + "\" footer link";
        } else if b.contains("Welcome to Webmatic") {
          let t = eregmatch("Webmatic ([0-9]{1,6}\\.[0-9]{1,6}(?:\\.[0-9]{1,6})*)", b);
          if type_of(t) == "array" && t.len() > 1 {
            ver = t[1];
            how = "\"Welcome to Webmatic\" home page, \"Webmatic " + t[1] + "\"";
          }
        }
      }
      let out = "";
      if ver != "" {
        let p = split(ver, ".");
        let a = int(p[0]);
        let m = if p.len() > 1 { int(p[1]) } else { 0 };
        let c = if p.len() > 2 { int(p[2]) } else { 0 };
        if a * 1000000 + m * 1000 + c < 3000003 {
          out = dir + "/index.php runs Valarsoft Webmatic " + ver + " (" + how + ")";
        }
      }
      out
    store_as: hit

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit
    pattern: "Valarsoft Webmatic"
    on_match:
      finding:
        title: "Valarsoft Webmatic < 3.0.3 multiple cross-site scripting (CVE-2009-4379)"
        description: "The site runs Valarsoft Webmatic older than 3.0.3. These releases return request input to the browser without sanitising it, so an attacker can run script in a victim's browser in the context of the site (cross-site scripting). Detected from the version only; the affected parameters were never published."
        remediation: "Upgrade Valarsoft Webmatic to 3.0.3 or later."
        confidence_delta: 0.45
        qod: 70
        evidence: "{{hit}}; fixed in 3.0.3"
      stop: true

View these feeds on GitHub