Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos network security services platform







WebApp Sec: Re: whitelisting HTML tags

Re: whitelisting HTML tags

From: <bugtraq_at_cgisecurity.net>
Date: Wed, 2 Nov 2005 10:45:03 -0500 (EST)

> I need to tell my development to limit the HTML tags allowed in input to a
> subset that can't be used for XSS.
>
> Any guidelines for this? Obviously <SCRIPT> and <IMG> are out.. but I want a
> whitelist of "safe" tags, not a blacklist of "bad" ones. Also, attributes. A
> list of attributes for each element that CANNOT introduce script code or
> references to background images, etc.

Even if you whitelist certain tags, script execution may still be possible in tag attributes.

Example:

<IMG SRC="javascript:alert(document.cookie);">

Other Examples: http://ha.ckers.org/xss.html

- admin_at_cgisecurity.com
http://www.cgisecurity.com/
Received on Nov 03 2005

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]