Security Advisory - Curesec Research Team
1. Introduction
Affected Product: Opendocman 1.3.4
Fixed in: 1.3.5
Fixed Version Link: http://www.opendocman.com/free-download/
Vendor Website: http://www.opendocman.com/
Vulnerability Type: HTML Injection
Remote Exploitable: Yes
Reported to vendor: 11/21/2015
Disclosed to public: 02/01/2016
Release mode: Coordinated Release
CVE: n/a
Credits Tim Coen of Curesec GmbH
2. Overview
CVSS
Medium 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
Description
To defend against XSS and similar attacks, opendocman depends on a function
that filters all input to remove dangerous tags and attributes.
The filter does filter out all simple approaches to XSS, but it still leaves an
attacker with large control over the look and functionality of the website.
This can lead to phishing attacks, privilege escalation, defacement, and may
lead to XSS with older browsers.
There are likely other possibilities for attackers. It is recommended to
HTML-encode user input before echoing it to mitigate these issues, instead of
relying on input filtering.
These issues are present across the application and are reflected as well as
persistent, for example via the profile or comments.
3. Proof of Concept
Privilege Escalation
A registered user can exploit this issue in combination with social engineering
to gain admin rights:
- Change any profile field, such as last name, to:
Smith">
Phishing & Defacement
Attacker-controlled elements can be shown in places where a user would only
expect application-controlled data, not user data, which can be used in
phishing attacks or to deface the website.
A simple example would be:
http://localhost/opendocman-1.3.4/search.php/">Security Alert: Please upgrade to the latest version here!';
category.php: