ColdCalendar — 1 vulnerability check

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

← All products · Feeds on GitHub

ColdGen ColdCalendar 2.06 EventID SQL injection

CVECVE-2010-4910
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/coldcalendar/CVE-2010-4910.yaml

ColdGen ColdCalendar 2.06 puts the EventID parameter of index.cfm (action ViewEventDetails) into an SQL query without validating it, allowing unauthenticated SQL injection against the calendar database.

Under the web root, /coldcal and /coldcalendar, this check first confirms the ColdCalendar page title on index.cfm. It then requests the event page with valid conditions (EventID=1 and EventID=1 and 1=1) as controls, which must not raise a database error, and with the invalid condition EventID=1 and 1. A ColdFusion "Error Executing Database Query" page whose statement ends in the injected text proves the value reaches the query unescaped. Nothing is written and no data is read from the database.

How noctis detects it

  1. HTTP(S) request GET {{adir}}/index.cfm
  2. HTTP(S) request GET {{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1
  3. HTTP(S) request GET {{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1+and+1%3D1
  4. HTTP(S) request GET {{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1+and+1
  5. Parses / computes the next value with a Rhai script
  6. Checks inj_resp.body for Error Executing Database Query → finding QoD 75: ColdCalendar EventID SQL injection (CVE-2010-4910)

References:

Feed source — tests/vulnerabilities/coldcalendar/CVE-2010-4910.yaml
# ColdGen ColdCalendar 2.06 — EventID SQL injection (CVE-2010-4910)
#
# The EventID parameter of index.cfm (fuseaction=ViewEventDetails) is placed
# into a query unescaped. When the value is not a plain number, ColdFusion
# answers with "Error Executing Database Query" and prints the failing
# statement ("SELECT * ... WHERE EventID = <value>").
#
# Detection (per candidate dir: web root, /coldcal, /coldcalendar):
#   0. index.cfm must carry the "ColdCalendar" page title.
#   1. Control: EventID=1 and EventID=1 and 1=1 (valid conditions) answer with
#      no database error.
#   2. QoD 75 — EventID=1 and 1 (not a boolean expression the database accepts)
#      answers with "Error Executing Database Query" whose statement echo ends
#      in "WHERE EventID = 1 and 1": our raw value reached the query.
#
# Read-only: the payload is a syntactically invalid condition, nothing is
# written and no data is read.
#
# Ported from OpenVAS/Greenbone NVT `2011/gb_coldcalendar_eventid_sql_inj_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.802253, GPL-2.0-only). Differences: a clean valid
# control request is required before the error probe is believed.
# CVSS: NVD carries only a CVSS v2 score (7.5).
uid: 462a6b21-669a-4801-83ea-d8016cf91a14
name: "ColdGen ColdCalendar 2.06 EventID SQL injection (CVE-2010-4910)"
description: |
  ColdGen ColdCalendar 2.06 puts the EventID parameter of index.cfm (action
  ViewEventDetails) into an SQL query without validating it, allowing
  unauthenticated SQL injection against the calendar database.

  Under the web root, /coldcal and /coldcalendar, this check first confirms
  the ColdCalendar page title on index.cfm. It then requests the event page
  with valid conditions (EventID=1 and EventID=1 and 1=1) as controls, which
  must not raise a database error, and with the invalid condition
  EventID=1 and 1. A ColdFusion "Error Executing Database Query" page whose
  statement ends in the injected text proves the value reaches the query
  unescaped. Nothing is written and no data is read from the database.
cves: [CVE-2010-4910]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [coldcalendar, coldfusion, sqli, error-based]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-4910"

steps:
  - id: init-idx
    action: set_var
    var_name: idx
    var_value: {status: 0, body: null}
    loop:
      over: ["", "/coldcal", "/coldcalendar"]
      var: adir

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

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

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

  - id: index
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.cfm"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: idx

  - id: control-plain
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1"
    condition: 'idx.status == 200 && type_of(idx.body) == "string" && stridx(idx.body, "<title>ColdCalendar") >= 0'
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: ctl1

  - id: control-true
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1+and+1%3D1"
    condition: 'ctl1.status == 200 && type_of(ctl1.body) == "string" && !ereg("Error Executing Database", ctl1.body)'
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: ctl2

  - id: inject
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.cfm?fuseaction=ViewEventDetails&EventID=1+and+1"
    condition: 'ctl2.status == 200 && type_of(ctl2.body) == "string" && !ereg("Error Executing Database", ctl2.body)'
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: inj_resp

  - id: check
    action: script
    code: |
      let b = if type_of(inj_resp.body) == "string" { inj_resp.body } else { "" };
      #{ err: inj_resp.status >= 200 && inj_resp.status < 600 && ereg("Error Executing Database Query", b) && ereg("WHERE EventID = 1 and 1", b) }
    store_as: res

  - id: report
    action: match
    source: inj_resp.body
    pattern: "Error Executing Database Query"
    condition: "res.err"
    on_match:
      finding:
        title: "ColdCalendar EventID SQL injection (CVE-2010-4910)"
        description: "The valid conditions EventID=1 and EventID=1 and 1=1 returned the event page, while EventID=1 and 1 made ColdFusion print an Error Executing Database Query page quoting the injected text in the WHERE clause: the value reaches an SQL query unescaped, so an unauthenticated attacker can run arbitrary SQL against the calendar database."
        remediation: "Validate EventID as an integer and use cfqueryparam in the query; upgrade ColdCalendar to a release that fixes CVE-2010-4910."
        confidence_delta: 0.45
        qod: 75
        evidence: "{{adir}}/index.cfm?fuseaction=ViewEventDetails: EventID=1 and 1=1 answers normally, EventID=1 and 1 answers with Error Executing Database Query quoting WHERE EventID = 1 and 1"
      stop: true

View these feeds on GitHub