Support Incident Tracker — 1 vulnerability check
noctis ships 1 vulnerability check for Support Incident Tracker, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Support Incident Tracker forgotpwd.php Referer reflected cross-site scripting
| CVE | CVE-2011-5073 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/support-incident-tracker/CVE-2011-5073.yaml |
Support Incident Tracker (SiT!) before 3.65 builds the "return" link of its password reset confirmation page, forgotpwd.php, from the HTTP Referer header and prints it without encoding, so a page that links a victim to the reset form can close the attribute and run script in the victim's browser. The page needs no login.
The check first requests forgotpwd.php with an unknown e-mail address, a request that changes nothing, to confirm the path is a SiT installation. It then asks for the password reset page of the first user (userid=1) with a Referer that closes the link and opens a tag holding a random marker, and reports the flaw when that tag comes back unescaped. Requesting the reset makes the application send its password reset e-mail to that user; no password is changed. The flaw is only visible when user 1 exists, which is the case on a default installation. Releases from 3.65 on no longer print the Referer and are not reported.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/forgotpwd.php?action=sendpwd&emailaddress=noctis-{{mark}}%40invalid.example - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/forgotpwd.php?userid=1&action=sendpwd - Parses / computes the next value with a Rhai script
- Checks
hitforprints the Referer→ finding QoD 75: Support Incident Tracker forgotpwd.php Referer reflected cross-site scripting
References:
- https://nvd.nist.gov/vuln/detail/CVE-2011-5073
- https://nvd.nist.gov/vuln/detail/CVE-2011-5071
- https://nvd.nist.gov/vuln/detail/CVE-2011-5072
- https://github.com/sitracker/sitracker/commit/b1ea53dcb2a2a4d901d0b65889896a1c365c3629
Feed source — tests/vulnerabilities/support-incident-tracker/CVE-2011-5073.yaml
# Support Incident Tracker (SiT!) forgotpwd.php — Referer header reflected cross-site scripting
# (CVE-2011-5073, item 5 of the record).
#
# CVE mapping: the backlog issue (#1656) lists CVE-2011-5071 .. CVE-2011-5075
# for "SiT! < 3.65". Only one of those flaws can be proven without a login or
# a particular configuration: the Referer reflection of forgotpwd.php, one of
# the fifteen XSS vectors of CVE-2011-5073. The SQL injections (5071/5072) sit
# in pages behind the login, except portal/kb.php, whose error is never shown
# and which only exists when the public knowledge base is enabled; 5074 is CSRF
# and 5075 (translate.php) needs a session. Those are not covered here.
#
# Source: sitracker/sitracker on GitHub. Before commit b1ea53dc ("Avoid using
# HTTP referer for redirection or links because it can be manipulated",
# 2011-08-24) forgotpwd.php printed
# <a href='{$_SERVER['HTTP_REFERER']}'> (action=sendpwd, user found)
# with no encoding; the fix dropped the link altogether.
#
# CVSS: NVD has only a v2 score for CVE-2011-5073 (4.3); no v3.x.
#
# Ported from OpenVAS/Greenbone NVT 2012/gb_sit_mult_sql_inj_and_xss_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.802388, GPL-2.0-only): GET
# <dir>/forgotpwd.php?userid=1&action=sendpwd with a Referer of
# <script>alert(document.cookie);</script>, reported when the reply is a 200
# that contains the script tag.
#
# Better than the NVT:
# - the reflected value is a random marker whose quote-closing and tag are
# checked exactly as sent, so an encoded reflection (fixed releases) is not
# reported and a fixed string cannot be echoed by a lookalike page;
# - the probe is only sent to a path that first answered the harmless
# "unknown e-mail address" request with SiT's own page (footer link to
# sitracker.org + forgotpwd markup), so a stray 200 elsewhere is never
# reported and no reset request goes to a host that is not SiT;
# - several install paths (/sit, /sitracker, /support and the web root)
# instead of the single location the detection NVT found.
uid: 0ac2d250-d47a-4dd0-8efa-2d5b1679301d
name: "Support Incident Tracker forgotpwd.php Referer reflected cross-site scripting"
description: |
Support Incident Tracker (SiT!) before 3.65 builds the "return" link of its
password reset confirmation page, forgotpwd.php, from the HTTP Referer
header and prints it without encoding, so a page that links a victim to the
reset form can close the attribute and run script in the victim's browser.
The page needs no login.
The check first requests forgotpwd.php with an unknown e-mail address, a
request that changes nothing, to confirm the path is a SiT installation.
It then asks for the password reset page of the first user (userid=1) with a
Referer that closes the link and opens a tag holding a random marker, and
reports the flaw when that tag comes back unescaped. Requesting the reset
makes the application send its password reset e-mail to that user; no
password is changed. The flaw is only visible when user 1 exists, which is
the case on a default installation. Releases from 3.65 on no longer print
the Referer and are not reported.
category: xss
cves: [CVE-2011-5073]
cvss: 4.3
severity: medium
confidence_base: 0.30
tags: [sit, sitracker, support-incident-tracker, php, xss, reflected, unauthenticated, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2011-5073"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-5071"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-5072"
- "https://github.com/sitracker/sitracker/commit/b1ea53dcb2a2a4d901d0b65889896a1c365c3629"
# OpenVAS/Greenbone NASL 2012/gb_sit_mult_sql_inj_and_xss_vuln.nasl (GPL-2.0-only)
steps:
- id: marker
action: script
code: "\"nx\" + rand_hex(8)"
store_as: mark
- id: init-hit
action: set_var
var_name: hit
var_value: ""
- id: init-gate
action: set_var
var_name: gate
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["/sit", "/sitracker", "/support", ""]
- id: init-page
action: set_var
var_name: page
var_value: {status: 0, body: ""}
- id: gate
action: http_request
method: GET
path: "{{dir}}/forgotpwd.php?action=sendpwd&emailaddress=noctis-{{mark}}%40invalid.example"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 8
condition: 'hit == ""'
store_as: gate
- id: is-sit
action: script
condition: 'hit == ""'
code: |
let b = if type_of(gate.body) == "string" { gate.body } else { "" };
gate.status == 200
&& stridx(b, "sitracker.org") >= 0
&& stridx(b, "Support Incident Tracker") >= 0
&& stridx(b, "class='forgotpwd'") >= 0
store_as: sit
- id: probe
action: http_request
method: GET
path: "{{dir}}/forgotpwd.php?userid=1&action=sendpwd"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 8
headers:
Referer: "http://noctis.invalid/'><b id={{mark}}>"
condition: 'hit == "" && sit == true'
store_as: page
- id: check
action: script
condition: 'hit == "" && sit == true'
code: |
let b = if type_of(page.body) == "string" { page.body } else { "" };
if page.status == 200
&& stridx(b, "<a href='http://noctis.invalid/'><b id=" + mark + ">") >= 0
&& stridx(b, "class='return'") >= 0 {
dir + "/forgotpwd.php prints the Referer header unescaped"
} else { "" }
store_as: hit
- id: report
action: match
source: hit
pattern: "prints the Referer"
on_match:
finding:
title: "Support Incident Tracker forgotpwd.php Referer reflected cross-site scripting"
description: "forgotpwd.php of Support Incident Tracker before 3.65 writes the HTTP Referer header into the return link of the password reset confirmation page without encoding it. A page that sends the visitor there with a crafted Referer closes the link and runs script in the visitor's browser, with no login needed."
remediation: "Upgrade Support Incident Tracker to 3.65 or later, which no longer prints the Referer header."
confidence_delta: 0.45
qod: 75
evidence: "{{hit}}"
stop: true