what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Core Security Technologies Advisory 2009.0922

Core Security Technologies Advisory 2009.0922
Posted Oct 6, 2009
Authored by Core Security Technologies | Site coresecurity.com

Core Security Technologies Advisory - Jetty includes several sample web applications for the developer to learn from. One of them sets cookies with user supplied data, and then dumps them as html. This application does not filter the user supplied data when outputting it to the visitor. This constitutes a persistent XSS vulnerability.

tags | advisory, web
SHA-256 | 1d3bae9ebf67441bb0401c9b336fb07ca5494eb9dfaf93b0173ebe8ac5891188

Core Security Technologies Advisory 2009.0922

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Core Security Technologies - CoreLabs Advisory
http://www.coresecurity.com/corelabs/

Jetty Persistent XSS in Sample Cookies Application



1. *Advisory Information*

Title: Jetty Persistent XSS in Sample Cookies Application
Advisory Id: CORE-2009-0922
Advisory URL: http://www.coresecurity.com/content/jetty-persistent-xss
Date published: 2009-10-06
Date of last update: 2009-10-06
Vendors contacted: Jetty Team
Release mode: Coordinated release



2. *Vulnerability Information*

Class: Persistent Cross-site Scripting [CWE-79]
Impact: Code execution
Remotely Exploitable: Yes
Locally Exploitable: No
Bugtraq ID: N/A
CVE Name: N/A



3. *Vulnerability Description*

Jetty [1] includes several sample web applications for the developer to
learn from. One of them sets cookies with user supplied data, and then
dumps them as html. This application does not filter the user supplied
data when outputting it to the visitor. This constitutes a persistent
XSS vulnerability [2].

This application accepts the cookie content as a GET parameter. This
allows an attacker to trick someone into clicking a handcrafted link
with malicious code as the cookie content, and thus executing that code
in a privileged domain, such as localhost, any domain in the intranet
zone, or a domain where another web application is running. For example,
the following link will result in JavaScript code being executed on the
localhost domain if the victim has deployed a default installation of
Jetty in his workstation:
http://localhost:8080/cookie/?Name=aaa&Value=bbb<script>alert(1)</script>bbbccc&Age=1111.



4. *Vulnerable packages*

. Jetty 6.1.19
. Jetty 6.1.20


5. *Non-vulnerable packages*

. Jetty 6.1.21
. Jetty 7.0.0


6. *Vendor Information, Solutions and Workarounds*

A workaround is to disable this particular example on any running
instance of Jetty in a particular workstation. Examples should always be
disabled on production servers, as recommended by the software vendor.


7. *Credits*

This vulnerability was discovered by Aureliano Calvo from Core Security
Technologies during Bugweek 2009 [3].


8. *Technical Description / Proof of Concept Code*

The problem resides in the 'CookieDump.java' file from the examples.

/-----
Cookie[] cookies = request.getCookies();

for (int i=0;cookies!=null && i<cookies.length;i++)
{

out.println("<b>"+cookies[i].getName()+"</b>="+cookies[i].getValue()+"<br/>");
}

- -----/
'cookies[i].getValue()' should be filtered to avoid malicious code from
being executed.


9. *Report Timeline*

. 2009-09-22:
Core Security Technologies contacts Jan Bartel and Greg Wilkins from
Webtide, notifying them of the existence of a XSS vulnerability in a
sample application. Core sends its PGP key and asks Jan for his, would
he like to keep future communications encrypted.

. 2009-09-23:
Greg Wilkins asks for technical information about the vulnerability in
plaintext. He also comments that some vulnerabilities have been fixed in
the 6.1.21 and 7.0 releases, and asks Core to verify if the reported
vulnerability has already been fixed in their repositories.

. 2009-09-23:
Technical details are sent by Core, specifying that the Persistent XSS
that was discovered has not been fixed in the repositories pointed to by
Greg. Core asks for a release date for the fixed version of Jetty in
order to release the advisory only when a fixed version is available.

. 2009-09-24:
Greg Wilkins acknowledges the vulnerability and confirms it will be
fixed on release 7.0.0, due the week of September 28th. A release date
for Jetty 6.1.22 is not yet scheduled. Greg mentions that the
recommended workaround for production servers is not to deploy the
example applications.

. 2009-09-28:
Core reminds Greg that a deadline for the release of this advisory has
been set to Monday October 5th.

. 2009-09-28:
Greg Wilkins agrees with the proposed publication date, since there is a
good workaround.

. 2009-10-06:
The advisory CORE-2009-0922 is published.



10. *References*

[1] http://jetty.mortbay.org/
[2] http://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
[3] The author participated in Core Bugweek 2009 as member of the team
"Bugged Coffee".


11. *About CoreLabs*

CoreLabs, the research center of Core Security Technologies, is charged
with anticipating the future needs and requirements for information
security technologies. We conduct our research in several important
areas of computer security including system vulnerabilities, cyber
attack planning and simulation, source code auditing, and cryptography.
Our results include problem formalization, identification of
vulnerabilities, novel solutions and prototypes for new technologies.
CoreLabs regularly publishes security advisories, technical papers,
project information and shared software tools for public use at:
http://www.coresecurity.com/corelabs.


12. *About Core Security Technologies*

Core Security Technologies develops strategic solutions that help
security-conscious organizations worldwide develop and maintain a
proactive process for securing their networks. The company's flagship
product, CORE IMPACT, is the most comprehensive product for performing
enterprise security assurance testing. CORE IMPACT evaluates network,
endpoint and end-user vulnerabilities and identifies what resources are
exposed. It enables organizations to determine if current security
investments are detecting and preventing attacks. Core Security
Technologies augments its leading technology solution with world-class
security consulting services, including penetration testing and software
security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core
Security Technologies can be reached at 617-399-6980 or on the Web at
http://www.coresecurity.com.


13. *Disclaimer*

The contents of this advisory are copyright (c) 2009 Core Security
Technologies and (c) 2009 CoreLabs, and may be distributed freely
provided that no fee is charged for this distribution and proper credit
is given.


14. *PGP/GPG Keys*

This advisory has been signed with the GPG key of Core Security
Advisories team, which is available for download at
http://www.coresecurity.com/files/attachments/core_security_advisories.asc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrLok0ACgkQyNibggitWa2zPACePgLnwb5adVWb8h3EINJyOSb/
j1YAnAzZqe2scXfUJt2WvtxiB/X+SlT3
=922k
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close