File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes vulnarabilites Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "vulnarabilites " Watch "vulnarabilites " New topic


udaykiranreddy desam

Joined: Jun 12, 2012
Posts: 10
what is XSS and what are the precautions to be taken for that
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites. Cross-site scripting (XSS) attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it.

An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used with that site. These scripts can even rewrite the content of the HTML page.

OWASP has a great deal of information on guarding against XSS attacks.

udaykiranreddy desam

Joined: Jun 12, 2012
Posts: 10
thanks for info and any one can help me with links to avoid these vulnerabilites or can post some help here to over come such vulnarabilites
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
As Tim said, check the OWASP site. More material is linked here:
udaykiranreddy desam

Joined: Jun 12, 2012
Posts: 10
ok thanks a lot for info
I agree. Here's the link:
subject: vulnarabilites
jQuery in Action, 3rd edition