[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AK-ADV2008-001] Openfire Jabber-Server: Multiple Vulnerabilities (Authentication Bypass, SQL injection, ...)
- To: bugtraq@xxxxxxxxxxxxxxxxx
- Subject: [AK-ADV2008-001] Openfire Jabber-Server: Multiple Vulnerabilities (Authentication Bypass, SQL injection, ...)
- From: Andreas Kurtz <mail@xxxxxxxxxxxxxxxx>
- Date: Sat, 08 Nov 2008 15:41:39 +0100
- Delivered-to: mailing list bugtraq@xxxxxxxxxxxxxxxxx
- Delivered-to: moderator for bugtraq@xxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding:sender; bh=pgIus5AoV4QMswK/s5GVJs/LhYlD+Z45VZ/veWSy9cQ=; b=V6bv0ebGBa5FdtQqfim4rjxz2cqstCWCFT0XaIyx9kxgSmrsBjD+B/eRcs8h2EImFk eOah/qPSVDvF2ML14q8xAAIiGlB8AOa1fVQr4lbPQCnc/PaLYob2sBMtjFqqn0jjVMGa Qsgb4TNJwgzrkSL5r8jKYRbNgsxbJtP9ykH8g=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:sender; b=hAnpKR5ZYAciBKbfAh6mmgvtxbE8dt5QdDitrUBUak06GbJL+6+jLGaIvOMzP/iDYs HTHnNGhjSJ2zAU0Uyqznz7ogn6PO686QmUciwf3rXCTpxQskU/pGrQ06+JU3pEhoVfin v4I9YSnc82xhNeSTdFgAMfENEtBtFaDxJcmO0=
- List-help: <mailto:email@example.com>
- List-id: <bugtraq.list-id.securityfocus.com>
- List-post: <mailto:firstname.lastname@example.org>
- List-subscribe: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact bugtraq-help@xxxxxxxxxxxxxxxxx; run by ezmlm
- Sender: Andreas Kurtz <andreas.kurtz@xxxxxxxxx>
- User-agent: Thunderbird 188.8.131.52 (Windows/20080914)
Please find attached a detailed advisory of the vulnerability.
Alternatively, the advisory can also be found at:
Advisory: Openfire Server Multiple Vulnerabilities
Advisory ID: AKADV2008-001
Release Date: 2008/11/07
Last Modified: 2008/11/07
Date Reported: 2008/05/17
Author: Andreas Kurtz (mail at andreas-kurtz.de)
Affected Software: Openfire Server <= 3.6.0a
Remotely Exploitable: Yes
Risk: Critical (x) High ( ) Medium ( ) Low ( )
Vendor URL: http://www.igniterealtime.org
Vendor Status: No patch released yet.
Patch development time: N/A
The jabber server Openfire (<= version 3.6.0a) contains several serious
vulnerabilities. Depending on the particular runtime environment these
issues can potentially even be used by an attacker to execute code
on operating system level.
1) Authentication bypass
This vulnerability provides an attacker full access to all functions
in the admin webinterface without providing any user credentials.
The Tomcat filter which is responsible for authentication could be
2) SQL injection
It is possible to pass SQL statements to the backend database through
a SQL injection vulnerability. Depending on the particular
runtime environment and database permissions it is even possible to
write files to disk and execute code on operating system level.
3) Multiple Cross-Site Scripting
An attacker could also manipulate a parameter to specify
a destination to which a user will be forwarded to after successful
1) Authentication bypass
Authentication to the openfire admin interface is secured by a filter in
the Tomcat application server (org.jivesoftware.admin.AuthCheckFilter).
This filter guarantees that access to the admin interface is only granted
to authenticated users. Otherwise they get redirected to a login page.
A design error in Openfire enables access to internal functions
without the need for admin user credentials.
The deployment descriptor (web.xml) configures some exclude values
for the AuthCheckFilter:
When a request URL contains one of these Exclude-Strings the
auth check mechanism is totally circumvented. This was considered
necessary for the initial setup process or the presence plugin.
Following POC demonstrates how an attacker could access
internal functions by manipulating the URL providing one of these
2) SQL injection
The parameter "type" in sipark-log-summary.jsp is prone to
SQL injection. Untrusted user data enters the application in
sipark-log-summary.jsp (line 163):
String type = ParamUtils.getParameter(request, "type");
The function getCalls() in org.jivesoftware.openfire.sip.calllog.CallLogDAO
processes this user input (SQLCondition) and constructs a SQL statement:
String sql = "SELECT * FROM sipPhoneLog";
sql = SQLCondition != null && !SQLCondition.equals("") ?
sql + " WHERE " + SQLCondition : sql;
sql += " ORDER BY datetime DESC";
That statement is executed in the method
in CallLogDAO (line 411):
In that case there is a SQL injection vulnerability present even though
prepared statemens are used. This happens because the string sql is
concatenated *before* it is passed to the prepared statement object.
3) Cross-Site Scripting
The parameter "url" in login.jsp was vulnerable to Cross-Site Scripting
This vulnerability is the only one which was fixed within the last 6
An attacker could also manipulate the parameter to specify a
destination to which a user will be forwarded to after successful
If a user authenticates using that link it is easily possible for an
attacker to hijack the users session.
Furthermore the parameter "username" in login.jsp is still vulnerable
to Cross-Site Scripting attacks.
Putting it all together:
Since the SIP-Plugin is deactivated by default, an attacker needs to
install it using the authentication bypass vulnerability and the
following POST request:
After that activation the described SQL injection vulnerability can
be used in a single unauthenticated request.
The following proof of concept uses a mysql database:
Since the vendor didn't release a patch within the last 6 months it is
highly recommended to deactivate access to the entire admin interface.
This can be achieved for example by blocking the according ports
(tcp/9090 & tcp/9091 by default) with a firewall. Following communication
to the admin interface can be done via SSL tunnels.
For more details see: http://www.andreas-kurtz.de/archives/63
2008/05/17 - Vendor notified using sales@xxxxxxxxxxxxxxxx
2008/05/18 - Vendor notified using gaston@xxxxxxxxxxxxxxxx
2008/05/20 - Vendor response
2008/05/20 - Detailed vulnerability information sent to the vendor
2008/05/21 - Vendor confirms the vulnerability
2008/08/18 - Asked vendor for up to date information regarding the
2008/10/18 - Again asked vendor for up to date information regarding the
2008/10/31 - Informed vendor of planned advisory realease on 2008/11/05
2008/11/07 - Full technical details and recommended measures released to
Vulnerability found and advisory written by Andreas Kurtz.
Revision 0.1 - Initial draft release to the vendor
Revision 1.0 - Final version released to general public
The information within this advisory may change without notice. Use
of this information constitutes acceptance for use in an AS IS
condition. There are no warranties, implied or express, with regard
to this information. In no event shall the author be liable for any
direct or indirect damages whatsoever arising out of or in connection
with the use or spread of this information. Any use of this
information is at the user's own risk.
Copyright 2008 Andreas Kurtz. All rights reserved.