V-CMS — 1 vulnerability check
noctis ships 1 vulnerability check for V-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
V-CMS 1.0 redirect.php reflected cross-site scripting
| CVE | CVE-2011-4827 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/vcms/CVE-2011-4827.yaml |
V-CMS 1.0 prints the p parameter of redirect.php back into the page inside a script block without encoding it, so an attacker can run script in the browser of any user who opens a crafted link (cross-site scripting).
Under the web root, /vcms and /v-cms, this check identifies V-CMS from the footer of index.php, then requests redirect.php with a harmless script tag carrying a random marker in the p parameter. The finding is reported when the tag sequence comes back verbatim, unencoded. Nothing is written to the target.
How noctis detects it
- HTTP(S) request
GET {{adir}}/index.php - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{adir}}/redirect.php?p=%3C/script%3E%3Cscript%3E{{g.mk}}%3C/script%3E - Parses / computes the next value with a Rhai script
- Checks
res.hitfor^true$→ finding QoD 75: V-CMS redirect.php reflected cross-site scripting (CVE-2011-4827)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2011-4827
- https://nvd.nist.gov/vuln/detail/CVE-2011-4826
- https://nvd.nist.gov/vuln/detail/CVE-2011-4828
Feed source — tests/vulnerabilities/vcms/CVE-2011-4827.yaml
# V-CMS 1.0 — redirect.php reflected cross-site scripting (CVE-2011-4827)
#
# redirect.php prints its p parameter back into an inline script without
# encoding it. CVE-2011-4827 also names the box parameter of
# includes/TrueColorPicker/index.php. The same advisory covers an SQL injection
# (CVE-2011-4826, user parameter of process.php) and an unrestricted upload
# (CVE-2011-4828, includes/inline_image_upload.php); neither is probed here.
#
# Detection (per candidate install dir: web root, /vcms, /v-cms):
# 0. index.php must carry the V-CMS footer ">V-CMS-Powered by V-CMS".
# 1. QoD 75 — redirect.php?p=</script><script>MARK</script> (MARK random per
# run) comes back with the sequence unencoded.
# 2. No finding when the tags are encoded or dropped.
#
# Read-only: one GET with a random marker, nothing is written.
#
# Ported from OpenVAS/Greenbone NVT `2011/gb_v-cms_mult_vuln.nasl`
# (GPL-2.0-only). Differences: the NASL reflects a fixed
# alert(document.cookie) payload; here a random inert marker is used.
# CVSS: NVD carries only a CVSS v2 score (4.3) for CVE-2011-4827.
uid: c498c2c2-9fe4-42a1-bf31-efaadf7670f5
name: "V-CMS 1.0 redirect.php reflected cross-site scripting (CVE-2011-4827)"
description: |
V-CMS 1.0 prints the p parameter of redirect.php back into the page inside a
script block without encoding it, so an attacker can run script in the
browser of any user who opens a crafted link (cross-site scripting).
Under the web root, /vcms and /v-cms, this check identifies V-CMS from the
footer of index.php, then requests redirect.php with a harmless script tag
carrying a random marker in the p parameter. The finding is reported when the
tag sequence comes back verbatim, unencoded. Nothing is written to the target.
cves: [CVE-2011-4827]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [v-cms, vcms, php, xss, reflected]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4827"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4826"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4828"
steps:
- id: init-login
action: set_var
var_name: login
var_value: {status: 0, body: ""}
loop:
over: ["", "/vcms", "/v-cms"]
var: adir
- id: init-stats
action: set_var
var_name: stats
var_value: {status: 0, body: ""}
- id: login-page
action: http_request
method: GET
port: "{{port}}"
path: "{{adir}}/index.php"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: login
- id: gate
action: script
code: |
let b = if type_of(login.body) == "string" { login.body } else { "" };
#{ ok: login.status == 200 && b.contains(">V-CMS-Powered by V-CMS"), mk: "NCT" + rand_hex(6) }
store_as: g
- id: reflect
action: http_request
method: GET
port: "{{port}}"
path: "{{adir}}/redirect.php?p=%3C/script%3E%3Cscript%3E{{g.mk}}%3C/script%3E"
condition: "g.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: stats
- id: check
action: script
code: |
let b = if type_of(stats.body) == "string" { stats.body } else { "" };
let tag = "</script><script>" + g.mk + "</script>";
#{ hit: g.ok && stats.status == 200 && b.contains(tag) }
store_as: res
- id: report
action: match
source: res.hit
pattern: "^true$"
condition: "res.hit"
on_match:
finding:
title: "V-CMS redirect.php reflected cross-site scripting (CVE-2011-4827)"
description: "The p parameter of redirect.php was returned inside the page with its script tags unencoded, so an attacker can run script in the browser of a user who follows a crafted link and act with that user's session."
remediation: "Replace V-CMS 1.0 with a maintained CMS, or HTML-encode every request parameter printed by redirect.php and includes/TrueColorPicker/index.php."
confidence_delta: 0.45
qod: 75
evidence: "{{adir}}/redirect.php?p=</script><script>{{g.mk}}</script> came back with the script tags unencoded"
stop: true