Webshop hun — 1 vulnerability check
noctis ships 1 vulnerability check for Webshop hun, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Webshop hun index.php lap Reflected Cross-Site Scripting
| CVE | CVE-2015-2244 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/webshop-hun/CVE-2015-2244.yaml |
Tests Webshop hun 1.062S, a PHP web shop, for the reflected cross-site scripting in the lap parameter of index.php, which the page prints without escaping. On the web root and under /webshop, the feed first checks that the landing page carries the "Powered by Webshop hun" credit, then requests index.php?lap="><script>alert(/marker/)</script>, where the marker is random for each scan, and reports the shop when that exact script element comes back unescaped in a 200 reply. A control request sending the same payload to a random, absent .php script in the same folder must not reflect it, so a server that echoes any parameter is not reported. The script is harmless and only reaches the scanner.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/ - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/index.php?lap=%22%3E%3Cscript%3Ealert(/{{sc.marker}}/)%3C/script%3E - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/{{sc.marker}}.php?lap=%22%3E%3Cscript%3Ealert(/{{sc.marker}}/)%3C/script%3E - Parses / computes the next value with a Rhai script
- Checks
hitfor^reflected$→ finding QoD 75: Webshop hun index.php lap Reflected Cross-Site Scripting (CVE-2015-2244)
References:
Feed source — tests/vulnerabilities/webshop-hun/CVE-2015-2244.yaml
# Webshop hun index.php lap reflected cross-site scripting — CVE-2015-2244
#
# Webshop hun 1.062S (Hungarian PHP web shop) prints the lap, param, center,
# termid and nyelv_id request parameters of index.php into the page without
# HTML escaping (CVE-2015-2244). The same release also has SQL injection in
# termid / nyelv_id (CVE-2015-2242) and a "mappa" path traversal
# (CVE-2015-2243); this feed proves the reflected script injection only.
#
# Detection (benign — the injected script only names a random marker and is
# shown to nobody but the scanner): the landing page must carry the product's
# "Powered by Webshop hun" credit; then GET
# <dir>/index.php?lap="><script>alert(/<marker>/)</script>
# (percent-encoded) and look for that exact, unescaped script element in a 200
# reply (QoD 75).
#
# Improvements over the reference check:
# - The reference matches a fixed alert(document.cookie) string; the feed
# sends a random marker per scan, so a page that always prints a fixed
# script is not reported.
# - A control request sends the same payload to a random, absent .php script
# in the same folder: a server that reflects it there too is a generic
# parameter reflector, not Webshop hun, and is not reported (fail-closed:
# no control reply, no finding).
#
# CVSS: CVE-2015-2244 v2 4.3 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2015/gb_webshop_huh_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.805353, GPL-2.0-only).
uid: 61faf2ad-05b7-4248-a3bb-bffb36b9c48b
name: "Webshop hun index.php lap Reflected Cross-Site Scripting (CVE-2015-2244)"
description: |
Tests Webshop hun 1.062S, a PHP web shop, for the reflected cross-site
scripting in the lap parameter of index.php, which the page prints without
escaping. On the web root and under /webshop, the feed first checks that the
landing page carries the "Powered by Webshop hun" credit, then requests
index.php?lap="><script>alert(/marker/)</script>, where the marker is random
for each scan, and reports the shop when that exact script element comes
back unescaped in a 200 reply. A control request sending the same payload to
a random, absent .php script in the same folder must not reflect it, so a
server that echoes any parameter is not reported. The script is harmless and
only reaches the scanner.
cves: [CVE-2015-2244]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [webshop-hun, php, shop, xss, reflected-xss, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2015-2244"
# OpenVAS/Greenbone NASL 2015/gb_webshop_huh_mult_vuln.nasl (GPL-2.0-only)
steps:
- id: gen-marker
action: script
code: |
let m = "noctis" + oob_token.sub_string(0, 8) + oob_token.sub_string(9, 4);
#{ marker: m, want: "<script>alert(/" + m + "/)</script>" }
store_as: sc
# ── Loop group: every following step runs once per folder ────────────────
- id: init-landing-r
action: set_var
var_name: landing_r
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/webshop"]
- id: init-probe-r
action: set_var
var_name: probe_r
var_value: {status: 0, body: ""}
- id: init-ctrl-r
action: set_var
var_name: ctrl_r
var_value: {status: 0, body: ""}
- id: init-ctrl-clean
action: set_var
var_name: ctrl_clean
var_value: false
- id: init-brand
action: set_var
var_name: brand
var_value: false
- id: init-hit
action: set_var
var_name: hit
var_value: ""
- id: landing
action: http_request
method: GET
path: "{{dir}}/"
port: "{{port}}"
tls_insecure: true
timeout_secs: 15
store_as: landing_r
- id: brand-check
action: script
code: |
let body = if type_of(landing_r.body) == "string" { landing_r.body } else { "" };
landing_r.status == 200 && body.contains("Powered by Webshop hun")
store_as: brand
- id: probe
action: http_request
method: GET
path: "{{dir}}/index.php?lap=%22%3E%3Cscript%3Ealert(/{{sc.marker}}/)%3C/script%3E"
port: "{{port}}"
tls_insecure: true
timeout_secs: 15
condition: "brand == true"
store_as: probe_r
- id: check
action: script
condition: "brand == true"
code: |
let body = if type_of(probe_r.body) == "string" { probe_r.body } else { "" };
if probe_r.status == 200 && body.contains(sc.want) { "reflected" } else { "" }
store_as: hit
# ── Control: the same payload to a random, absent .php script ───────────
- id: control
action: http_request
method: GET
path: "{{dir}}/{{sc.marker}}.php?lap=%22%3E%3Cscript%3Ealert(/{{sc.marker}}/)%3C/script%3E"
port: "{{port}}"
tls_insecure: true
timeout_secs: 15
condition: 'hit != ""'
store_as: ctrl_r
- id: control-check
action: script
condition: 'hit != ""'
code: |
let body = if type_of(ctrl_r.body) == "string" { ctrl_r.body } else { "" };
ctrl_r.status != 0 && !body.contains(sc.want)
store_as: ctrl_clean
- id: report
action: match
source: hit
pattern: "^reflected$"
condition: "ctrl_clean == true"
on_match:
finding:
title: "Webshop hun index.php lap Reflected Cross-Site Scripting (CVE-2015-2244)"
description: "An unauthenticated request to index.php of a Webshop hun shop with the lap parameter set to a script element carrying a random marker returned that script element unescaped in the page, while an absent script in the same folder did not reflect it. An attacker can send a shopper a link that runs any script in the shop's origin, for example to steal the session cookie."
remediation: "Upgrade Webshop hun to a release that escapes the lap, param, center, termid and nyelv_id parameters, or filter them at a web application firewall; the product is unmaintained, so consider moving to a maintained web shop."
confidence_delta: 0.50
qod: 75
evidence: "{{dir}}/index.php?lap=\"><script>alert(/{{sc.marker}}/)</script> was reflected unescaped: {{sc.want}}; the same payload sent to an absent script ({{dir}}/{{sc.marker}}.php) was not"
stop: true