Etiko CMS — 1 vulnerability check
noctis ships 1 vulnerability check for Etiko 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
Etiko CMS page_id / article_id Reflected XSS
| CVE | CVE-2014-8505 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/etiko-cms/CVE-2014-8505.yaml |
Tests Etiko CMS for the reflected cross-site scripting in the page_id parameter of loja/index.php and index.php and the article_id parameter of index.php. Under the web root, /etiko and /cms, the feed first checks that index.php is an Etiko CMS page, then sends each parameter the value 19"><script>alert(/marker/)</script>, where marker is random for each scan. A vulnerable Etiko CMS copies the value unescaped into the page it renders, so the double quote closes the attribute and a script element is added. The finding requires an Etiko CMS page holding the injected script element with this scan's marker, verbatim. A version that HTML-escapes the value is not reported. The requests only render pages and change nothing on the server.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{t.dir}}/index.php - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{t.dir}}{{t.probe}}19%22%3E%3Cscript%3Ealert%28%2F{{tok}}%2F%29%3C%2Fscript%3E - Parses / computes the next value with a Rhai script
- Checks
xss_prooffor^"><script>alert\(/noctis[0-9a-f]{12}/\)</script>$→ finding QoD 75: Etiko CMS page_id / article_id Reflected XSS (CVE-2014-8505)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2014-8505
- http://packetstormsecurity.com/files/128644/Etiko-CMS-Cross-Site-Scripting-SQL-Injection.html
- https://exchange.xforce.ibmcloud.com/vulnerabilities/97031
Feed source — tests/vulnerabilities/etiko-cms/CVE-2014-8505.yaml
# Etiko CMS reflected XSS through page_id / article_id — CVE-2014-8505
#
# Etiko CMS (etikweb.com) prints the page_id query value of loja/index.php and
# the article_id value of index.php back into the page without HTML escaping
# (CVE-2014-8505, Etiko CMS 2.14 and earlier). A value such as
# 19"><script>...</script> closes the surrounding attribute and adds a script
# element to the page.
#
# Detection (benign, read-only), for each install dir (web root, /etiko, /cms):
# 1. GET <dir>/index.php: the landing page must be Etiko CMS (">Etiko<" and
# "etikweb.com", as in the source check).
# 2. GET one of <dir>/index.php?page_id=, <dir>/index.php?article_id=,
# <dir>/loja/index.php?page_id= with 19"><script>alert(/<marker>/)</script>,
# <marker> random per scan.
# 3. Reported when the reply is an Etiko page (">Etiko<" or "etikweb.com")
# holding "><script>alert(/<marker>/)</script> verbatim (an optional
# backslash before the quote is accepted: PHP magic_quotes_gpc). QoD 75.
#
# Improvements over the source NASL:
# - The NASL only sends page_id to <dir>/index.php. The CVE record names
# page_id on loja/index.php and article_id on index.php: both are probed too.
# - Random marker per scan instead of the fixed alert(document.cookie): a page
# that always prints that string is not reported.
# - The NASL's PHP-capability pre-check is dropped (the landing gate already
# proves the product).
#
# CVE-2014-8506 (SQL injection through the same parameters) is listed by the
# same advisory but the source check does not test it; it is tracked in
# issue #2222.
#
# CVSS: NVD has only a CVSS v2 score for CVE-2014-8505 (4.3, medium); the
# issue's 7.5 is the v2 score of CVE-2014-8506 (SQLi).
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_etiko_cms_mult_vuln.nasl
# (GPL-2.0-only).
uid: 11d39567-30de-40fb-9fb2-523550b04953
name: "Etiko CMS page_id / article_id Reflected XSS (CVE-2014-8505)"
description: |
Tests Etiko CMS for the reflected cross-site scripting in the page_id
parameter of loja/index.php and index.php and the article_id parameter of
index.php. Under the web root, /etiko and /cms, the feed first checks that
index.php is an Etiko CMS page, then sends each parameter the value
19"><script>alert(/marker/)</script>, where marker is random for each scan.
A vulnerable Etiko CMS copies the value unescaped into the page it renders,
so the double quote closes the attribute and a script element is added.
The finding requires an Etiko CMS page holding the injected script element
with this scan's marker, verbatim. A version that HTML-escapes the value is
not reported. The requests only render pages and change nothing on the
server.
cves: [CVE-2014-8505]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [etiko-cms, cms, xss, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-8505"
- "http://packetstormsecurity.com/files/128644/Etiko-CMS-Cross-Site-Scripting-SQL-Injection.html"
- "https://exchange.xforce.ibmcloud.com/vulnerabilities/97031"
# OpenVAS/Greenbone NASL 2014/gb_etiko_cms_mult_vuln.nasl (GPL-2.0-only)
steps:
# Random marker for this scan (letters and hex digits only).
- id: marker
action: script
code: |
"noctis" + oob_token.sub_string(0, 8) + oob_token.sub_string(9, 4)
store_as: tok
# ── Loop group: every following step runs once per "<dir>|<probe>" pair.
# Each pass resets the values it reads, so nothing is left over.
- id: init-land-r
action: set_var
var_name: land_r
var_value: {status: 0, body: ""}
loop:
var: target
over:
- "|/index.php?page_id="
- "|/index.php?article_id="
- "|/loja/index.php?page_id="
- "/etiko|/index.php?page_id="
- "/etiko|/index.php?article_id="
- "/etiko|/loja/index.php?page_id="
- "/cms|/index.php?page_id="
- "/cms|/index.php?article_id="
- "/cms|/loja/index.php?page_id="
- id: init-probe-r
action: set_var
var_name: probe_r
var_value: {status: 0, body: ""}
- id: split-target
action: script
code: |
let p = split(target, "|");
#{ dir: p[0], probe: p[1] }
store_as: t
- id: landing
action: http_request
method: GET
path: "{{t.dir}}/index.php"
port: "{{port}}"
tls_insecure: true
timeout_secs: 15
store_as: land_r
# Etiko CMS landing page (both markers, as in the source check).
- id: gate
action: script
code: |
land_r.status == 200 && type_of(land_r.body) == "string"
&& land_r.body.contains(">Etiko<") && land_r.body.contains("etikweb.com")
store_as: is_etiko
- id: probe
action: http_request
condition: "is_etiko"
method: GET
path: "{{t.dir}}{{t.probe}}19%22%3E%3Cscript%3Ealert%28%2F{{tok}}%2F%29%3C%2Fscript%3E"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: probe_r
# The injected script element with this scan's marker, right after the
# closing double quote, on an Etiko CMS page — or "".
- id: reflection
action: script
code: |
let out = "";
if probe_r.status == 200 && type_of(probe_r.body) == "string" {
let b = probe_r.body;
if b.contains(">Etiko<") || b.contains("etikweb.com") {
// \\? : PHP magic_quotes_gpc prints a backslash before the quote;
// still a breakout in HTML.
if ereg("\\\\?\"><script>alert\\(/" + tok + "/\\)</script>", b) {
out = "\"><script>alert(/" + tok + "/)</script>";
}
}
}
out
store_as: xss_proof
- id: report
action: match
source: xss_proof
pattern: '^"><script>alert\(/noctis[0-9a-f]{12}/\)</script>$'
on_match:
finding:
title: "Etiko CMS page_id / article_id Reflected XSS (CVE-2014-8505)"
description: "An Etiko CMS page requested with a parameter value ending in a double quote and a script element was rendered with that value copied unescaped, so the quote closes the attribute and the script element is added to the page. An attacker can send a crafted link that runs script in the browser of a visitor or administrator of the site."
remediation: "Upgrade Etiko CMS to a release later than 2.14 that escapes the page_id and article_id parameters, or contact the vendor (etikweb.com); until then, filter these parameters to digits only at a reverse proxy or web application firewall."
confidence_delta: 0.55
qod: 75
evidence: "GET {{t.dir}}{{t.probe}}19%22%3E%3Cscript%3E... returned HTTP 200 with an Etiko CMS page containing the injected element: {{xss_proof}}"
stop: true