[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL Injection, is it possible?

Subject: Re: XSL Injection, is it possible?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 29 May 2006 23:53:38 +0100
xml injection
> Currently my sanitizing function just escapes <, >, ', and " in the 
If you are taking in a string and want to ensure that it is encoded in
XML as itself (in character data) rather than markup then you  need
to escape < and & (and > if it follows ]]) you don't need to escape " or
' unless you are putting the string in attribute values.

> Are these characters recognized by the XSLT engine 
> if they are hex or unicode encoded?

All XML text is unicode encodes in one way or another, so it's not quite
clear what you mean there. Encoding issues are resolved by the XML
parser before XSLT really sees the input. If you are taking unknown text
you should be escaping & as &amp; so then a character ref such as &#a0; 
would be escaped tp &amp;#a0;.

> but I was wondering if anyone knows of other vectors by which 
> attackers can enter

attacks are as likely to come from what is inserted into XML character
data as from any XML markup that is inserted. Specifically if the
stylesheets are generating html then if there is a danger of script
being inserted you need to quote (or disable) possible script syntax.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.