Struts Input Validation Hole in Error Message Permits Cross-Site Scripting Attacks
|
|
SecurityTracker Alert ID: 1015257
|
|
SecurityTracker URL: http://securitytracker.com/id?1015257
|
|
CVE Reference: CVE-2005-3745
(Links to External Site)
|
Date: Nov 23 2005
|
Impact: Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information
|
Fix Available: Yes
Exploit Included: Yes
Vendor Confirmed: Yes
|
Version(s): 1.2.7, running on WebLogic 8.1 SP4 and SP5 and on Resin Web Server
|
Description: A vulnerability was reported in Struts. A remote user can conduct cross-site scripting attacks.
An error processing script does not properly filter HTML code from user-supplied input before displaying the input. A remote user
can create a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by the
target user's browser. The code will originate from the site running the Struts software and will run in the security context of
that site. As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated
with the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as
the target user.
A non-existent Struts action URL will trigger the flaw.
Irene Abezgauz of Hacktics Ltd. reported this vulnerability.
The
original advisory is available at:
http://www.hacktics.com/AdvStrutsNov05.html
|
Impact: A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the
Struts software, access data recently submitted by the target user via web form to the site, or take actions on the site acting
as the target user.
|
Solution: The vendor has issued a fixed version (1.2.8), available at:
http://struts.apache.org/acquiring.html
|
Vendor URL: struts.apache.org/ (Links to External Site)
|
Cause: Input validation error
|
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
|
Reported By: "Irene Abezgauz" <irene@Hacktics.com>
|
Message History:
This archive entry has one or more follow-up message(s) listed below.
|
Source Message Contents
|
Date: Mon, 21 Nov 2005 18:17:46 +0200
From: "Irene Abezgauz" <irene@Hacktics.com>
Subject: [Full-disclosure] Security Advisory: Struts Error Message Cross
|
Background
==========
Struts is an open source framework for building web applications. The
core of the Struts framework is a flexible control layer based on
standard technologies such as Java Servlets, JavaBeans, resource
bundles, and the Extensible Markup Language (XML). Struts can be used
with different Java engines, such as WebLogic, TomCat, JRun, etc.
Scope
=====
After identifying in Struts an error message echoing the path back to
the user, Hacktics has conducted a research of identifying a cross site
scripting vulnerability in the implementation of this error on different
application servers.
The Finding
===========
When attempting to access a non existent Struts action URL (including
the Struts URL suffix, e.g. .do), the struts request handler generates
an error echoing the path of the requested action. The mechanism
generating this error does not perform sufficient input validation nor
perform HTML encoding of the output, thus exposing the system, in some
environments, to a Cross Site Scripting attack.
For detailed description and exploit please visit
http://www.hacktics.com/AdvStrutsNov05.html
Versions Tested
===============
Vulnerable
Struts 1.2.7 Running on WebLogic 8.1 SP4
Struts 1.2.7 Running on WebLogic 8.1 SP5
Struts 1.2.7 Running on Resin Web Server
Non Vulnerable
Struts Running on Apache Tomcat 5.5.9
Struts Running on Apache Tomcat 5.5.12
Solution
========
The Apache Struts group has been notified of this vulnerability on
November 3rd, and has fixed the problem in the new Struts release
(1.2.8). Upgrading to the new version will eliminate the threat.
Alternatively, a work around is available on existing versions by
configuring the web server to display custom error messages rather than
the default ones.
-----------------------
Irene Abezgauz
Application Security Consultant
Hacktics Ltd.
Mobile: +972-54-6545405
Web: http://www.hacktics.com
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
|
|