Cross-Site Scripting: An attack method that involves injection of code or markup into a webpage. There are three major types of XSS: Reflected XSS, Stored XSS (aka persistent XSS), DOM-based XSS (aka client side XSS).

learn more… | top users | synonyms

3
votes
2answers
691 views

Is it possible to forge post request and bypass maxlength in input box?

I have input box with maxlength=12, and that input box is vulnerable to xss. But because of maxlength 12 it is not possible to construct any really valid xss vector. The user input is stored in the ...
3
votes
5answers
387 views

Does setting the cookie-path protect me from XSS from another context?

Lets say I am using a reverse proxy with URL rewriting that provides access to 2 different applications http://www.example.com/app1/ and http://www.example.com/app2/. I don't want those ...
1
vote
1answer
527 views

LFI or RFI from XSS?

Could XSS lead us to the Local File Include or Remote File Include? I read article that it's possible to upload shell via XSS vulnerability, but I still have no idea how it had been achieved.
3
votes
1answer
234 views

Multibyte Character Exploits JSP/PostgreSQL

I am trying to secure a web application, written in Java/JSP and running on PostgreSQL, against SQL injection. I ran into this very interesting answer, which refers to PHP and MySQL. Is there any ...
2
votes
3answers
279 views

sanitizing likes/unlikes in application?

I've got a function in my app where users can click on a "thumbs up" image and a like is recorded in the database; all that's recorded is the user's ID and the ID of the post that the user liked. I ...
0
votes
2answers
141 views

Where is cross-site scripting code processed?

Where does the snippet or Javascript get processed when we enter that in input box of HTML page or any URL? Does it go to the server and come back or does the browser process it?
5
votes
3answers
579 views

Is it a security risk to embed a commenting service (like Disqus) into our site?

Can commenting services like Disqus, IntenseDebate, etc. pose a security risk for corporations? Edit: What risks could arise when embedding such services into corporate websites?
6
votes
3answers
3k views

Is it possible to inject HTML into image to provoke XSS?

Some answers mention that it's possible to inject attacker-controlled HTML into images and therefore provoke XSS. I guess that this HTML will be processed by browser only if hole exists in browser. ...
2
votes
3answers
2k views

How to fix specific XSS issues in URL via php?

I am using Netsparker community edition for checking my app for any general security holes. I'm getting a lot of following XSS probable issue areas: my_php_file.php?nsextt=" ...
1
vote
2answers
1k views

header injection + codeigniter

I'm reading through Mozilla's Secure Coding Guidelines, and found this statement: Don't trust any user data (input, headers, cookies etc). Validate it before using it I'm using the codeigniter ...
2
votes
1answer
972 views

javascript:alert(“test”); command does not work

Hello! As I have done before and also have read in many web sites, that just simply writing: javascript:alert(document.cookie); should work on any web page. But now, I was not able to execute it. I ...
3
votes
5answers
2k views

How can I execute a XSS with these conditions?

I am trying to learn penetration testing and I have downloaded a vulnerable application called "Bodgeit Store". I have finished almost all the challenges except one which is to execute a Cross-Site ...
19
votes
2answers
2k views

How do I use Markdown securely?

How do I use the Markdown library safely? What do I need to do to make sure that its output is safe to include into my web page? I want to allow untrusted users to enter content (in Markdown ...
-1
votes
2answers
169 views

Is it Illegal to break out of a forum post by using CSS for example?

Is it illegal in the UK to post styling that breaks out of a post? For instance, if styling were allowed here and I were to use it to change some stackexchange pictures on this page, would that be ...
2
votes
2answers
5k views

Best Approach for removing XSS Vulnerability

I have been developing a Webobjects application, and I found that my application is vulnerable to XSS through URL, but not when malicious input like <script>alert("hi")</script> is input ...
3
votes
3answers
1k views

XSS : Content-type: application/json

Background information - Application responds to request to a particular URL with content-type: application/json JSON response contains a parameter from the request Escapes the quote with a slash ...
5
votes
4answers
9k views

Security issues using iframes

We are looking to move to iframes due to technical challenges. By moving to iframes it will be easier to manage the technical issues. But we are not totally sure of security implications of iframes. ...
6
votes
2answers
1k views

Is e-mail a direct vector for XSS

I'm curious if there is a way to execute XSS via email. I am not talking about using e-mail as a way to deliver a link that has reflected XSS in it. I'm talking about sending an email from ...
10
votes
2answers
840 views

Interpolique: transparently preventing SQL Injection and XSS with base64 encoding, what happened?

For the keynote at The Next HOPE a couple of years ago, Dan Kaminsky unveiled Interpolique (the talk is really fun btw). The problem he raised was how to defend against injection attacks, including ...
2
votes
2answers
142 views

For untrusted user upload sites: what should the contents of crossdomain.xml and clientaccesspolicy.xml be?

Flash has a long history of ignoring MIME types of files and reading the file directly for executable content or for cross domain execution permissions. That means a malicious user can take advantage ...
1
vote
1answer
2k views

Will JavaScript be executed which is in an HREF?

I located an issue with a site where I can insert a script tag into the href of an anchor tag: <a href="<script>alert(8007)</script>">Click Me</a> What I am trying to ...
3
votes
1answer
314 views

Notable XSS attacks in 2011

I am wondering what notable events in XSS attacks we saw in 2011. What big events hit the infosec community in regards of XSS? I am thinking of specific events like for example the Samy worm in 2007 ...
1
vote
2answers
1k views

How do I figure out how malware infected my server, and the subsequent sites on the server?

I recently was in charge of fixing our server at work, and cleaning the sites on it. We were infected with some malware that injected some code into some of our clients websites. Apparently, there was ...
2
votes
2answers
718 views

Removing Google Analytics cookie string from URL - security hole?

On our site, we use google analytics and we have to put the GA cookie in the URL since we have a two letter domain and IE imposes some cookie limitations on those. This means that when going between ...
0
votes
2answers
158 views

How much security should I use for my web application?

My question is, for a "normal" site, what do you think is enough to secure against methods used by "script kiddies"? For example, SQL injection, XSS, and stuff like that. Same question for password ...
2
votes
2answers
3k views

Is this JSON encoding vulnerable to CDATA injection?

I ran across an odd notation in the jsfiddle.net generated pages <script type='text/javascript'>//<![CDATA[ $(window).load(function(){ $('form, table').animate({ opacity: 1 }); ...
1
vote
2answers
7k views

Bypassing XSS filters [duplicate]

Possible Duplicate: New XSS cheatsheet? Can anyone give me list of ways to encode XSS payload , or to be precise what are the ways to encode XSS payload to bypass encoding of <> or (). I ...
5
votes
1answer
3k views

Is this jQuery ajax call vulnerable to XSS?

If somebody can edit $("#field").val(), can they change the url property here to point to another location? $.ajax({ url: "http://mywebsite/script?param=" + $("#field").val(), dataType: "jsonp", ...
6
votes
3answers
260 views

Is XSS dangerous on web without login/sensitive user's data?

Is XSS dangerous when the web application doesn't have a login/register function, the user isn't logged in or when the website doesn't store any sensitive user information?
10
votes
2answers
3k views

Is strip_tags() horribly unsafe?

I always use strip_tags to prevent XSS attacks, but today I saw a post which was telling it's horribly unsafe. As the manual says, it doesn't check for malformed HTML! Is it true? What can I do to ...
8
votes
3answers
968 views

How bad is a Self Contained XSS attack?

Some of you might be familiar with this attack called Self Contained XSS. I recently stumbled upon this article about it. So how bad this kind of attack can be, even though this doesn't have access to ...
6
votes
2answers
222 views

Presentation on Web App Security (ACM Student Chapter)

I am a member of the local ACM student chapter in my university and as part of our activities I am scheduled to give a talk on current issues on Web Application Security (and possibly secure coding ...
7
votes
1answer
812 views

Is Request.getHeader(“host”) vulnerable?

If the following is the code snippet, what would be your suggestions? <script type="text/javascript" src="<%=request.getHeader("Host")%>/XXX/xxx.js"></script> Is this a clear ...
3
votes
1answer
991 views

XSS in SWF file

I have the following code in an SWF file that a vulnerability scanner marks as XSS: // Action0 { var __callResult_6 = getURL(_root.thankYou, "_self"); var __callResult_7 = stop(); ...
5
votes
6answers
903 views

Filter user input before the database or upon display?

Given a web application where user data must be properly escaped to avoid XSS, is it better to try to remove the "bad stuff" before it enters the database, or is it best to allow it in the database ...
3
votes
2answers
2k views

Is there a way to bypass escape function in javascript?

Is there a way to bypass escape function in javascript for exploiting a XSS vulnerability ?
0
votes
3answers
406 views

DOM XSS : Need Help

I was trying my hands at DOM based XSS. I came across a scenario where user controlled string from the URL is included in javascript as below var userControlled=substring of URL; ...
8
votes
1answer
978 views

Closing an HTML element without using literal slashes?

I'm investigating a vulnerability in an application that echoes a user-supplied filename without sanitizing the filename. E.g. a file named test-<script>alert("evil");.txt will result in that ...
5
votes
4answers
1k views

Server wide javascript injection

UPDATE: The server was rooted, php.ini was replaced that cause the injection to appear. Still haven't figured out which directive is injecting the javascript. I'm troubleshooting a hacked website ...
3
votes
1answer
4k views

URLEncode vs HTMLEncode for XSS prevention

I have one project (in Java) that the programmer used URLEncode to output content as part of HTML instead of HTMLEncode. What is the risk that it is XSS vulnerable? (Let’s forget that it’s different ...
7
votes
3answers
5k views

PHP functions for preventing XSS

Is there a proven library with functions for preventing XSS attacks? Many people don't realise that htmlspecialchars is not enough to prevent XSS attacks. There are various contexts that need their ...
7
votes
3answers
759 views

How serious are XSS attacks

A website I visit allows this kind of attack, to be implemented with GET in the URL <SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> Along with many others on this page: ...
21
votes
2answers
3k views

JavaScript written only with brackets?

I once saw JavaScript code which was only written as multiple brackets (). Does anybody remember this kind of code? There was also an online converter to convert "normal" JS into this style of code. I ...
2
votes
1answer
321 views

Has The IE8 XSS Filter XSS Flaw Been Fixed?

You may remember: X-XSS-Protection: 0 http://hackademix.net/2009/11/21/ies-xss-filter-creates-xss-vulnerabilities/ Has this been fixed in IE8? IE9? IE10? Is it implemented in IE7?
15
votes
1answer
2k views

Does the practice of blocking an off-site “Referer:” HTTP requests improve website security?

Is there any benefit for a security-paranoid website to disallow HTTP requests that have a Referer: from 3rd party sites? The pitch is that if such a HTTP request were to come in, then certain XSS ...
3
votes
5answers
356 views

Is it possible to see if a script on a website steals session cookies?

I'm looking as some web analytics solutions, I know it sounds paranoid. but cookie-based web analytics need for you to paste their JavaScript code on your web-site. I don't like the idea too much of ...
4
votes
2answers
1k views

Are PHP Sessions based on cookies or a cookie-IP pair?

I have a PHP website and my question is: If someone manages to steal my users' cookies via an XSS attack, is it enough for him to be identified as the user? Or does his IP also have to be the same as ...
4
votes
2answers
494 views

Is this an example of XSS attack?

A scripter sees on certain web pages it's technically possible to include markup like HTML and CSS/JS. It's technically possible to submit a javascript or iframe and have it display to the visitor ...
5
votes
4answers
591 views

Is XSS dangerous in application without database?

I think it definitelly isn't, because XSS which isn't saved anywhere would damage ONLY attacker. Am I right or are there any cases where XSS could hurt non-db-application? (I mean datas are not saved ...
12
votes
5answers
2k views

Solution to allow JavaScript input but prevent XSS

We have a simple Blog system that allows users to input html and JavaScript to build a blog page. I'm aware that allowing javascript open up the door to xss attacks. We do however need to allow users ...