The pId parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the pId parameter, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The application attempts to block SQL injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) before the characters that are being blocked.
Remediation detail
NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
Issue background
SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.
Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.
Remediation background
The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.
You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:
One common defense is to double up any single quotation marks appearing within user input before incorporating that input into a SQL query. This defense is designed to prevent malformed data from terminating the string in which it is inserted. However, if the data being incorporated into queries is numeric, then the defense may fail, because numeric data may not be encapsulated within quotes, in which case only a space is required to break out of the data context and interfere with the query. Further, in second-order SQL injection attacks, data that has been safely escaped when initially inserted into the database is subsequently read from the database and then passed back to it again. Quotation marks that have been doubled up initially will return to their original form when the data is reused, allowing the defense to be bypassed.
Another often cited defense is to use stored procedures for database access. While stored procedures can provide security benefits, they are not guaranteed to prevent SQL injection attacks. The same kinds of vulnerabilities that arise within standard dynamic SQL queries can arise if any SQL is dynamically constructed within stored procedures. Further, even if the procedure is sound, SQL injection can arise if the procedure is invoked in an unsafe manner using user-controllable data.
Request 1
GET /weddingwarehouse/ProductPage.aspx?pId=P1984(KnotShop)%00' HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http ...[SNIP]... <link rel="canonical" href="http://weddingshop.theknot.com/WEDDINGWAREHOUSE/ErrorPage.aspx" /> ...[SNIP]...
Request 2
GET /weddingwarehouse/ProductPage.aspx?pId=P1984(KnotShop)%00'' HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fb ...[SNIP]...
2. Cookie without HttpOnly flag setpreviousnext There are 7 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 highlighted cookies appear to contain session tokens, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/BoutiqueDetail.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=OnSaleKWS(KnotShop)&cId=OnSaleKWS(KnotShop)&cTypF=OS&filter=& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fb ...[SNIP]...
The highlighted cookies appear to contain session tokens, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/BoutiqueDetailWithImage.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=Chocolates(KnotShop)&cId=Boutiques(KnotShop)&cTypF=BO&filter=&org=BO& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fb ...[SNIP]...
The highlighted cookies appear to contain session tokens, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/ProductPage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/weddingwarehouse/ErrorPage.aspx?errCode=1007'>here</a>.</h2> </body></html>
The highlighted cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/SubCategory.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/WEDDINGWAREHOUSE/ErrorPage.aspx?errorCode=1015'>here</a>.</h2> </body></html>
The highlighted cookies appear to contain session tokens, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/UICategory.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The highlighted cookies appear to contain session tokens, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Request
GET /weddingwarehouse/homepage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fb ...[SNIP]...
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET / HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
A cookie's domain attribute determines which domains can access the cookie. Browsers will automatically submit the cookie in requests to in-scope domains, and those domains will also be able to access the cookie via JavaScript. If a cookie is scoped to a parent domain, then that cookie will be accessible by the parent domain and also by any other subdomains of the parent domain. If the cookie contains sensitive data (such as a session token) then this data may be accessible by less trusted or less secure applications residing at those domains, leading to a security compromise.
Issue remediation
By default, cookies are scoped to the issuing domain and all subdomains. If you remove the explicit domain attribute from your Set-cookie directive, then the cookie will have this default scope, which is safe and appropriate in most situations. If you particularly need a cookie to be accessible by a parent domain, then you should thoroughly review the security of the applications residing on that domain and its subdomains, and confirm that you are willing to trust the people and systems which support those applications.
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET / HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/BoutiqueDetail.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/WEDDINGWAREHOUSE/ErrorPage.aspx?errorCode=1015'>here</a>.</h2> </body></html>
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/BoutiqueDetailWithImage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/WEDDINGWAREHOUSE/ErrorPage.aspx?errorCode=1015'>here</a>.</h2> </body></html>
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/ProductPage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/weddingwarehouse/ErrorPage.aspx?errCode=1007'>here</a>.</h2> </body></html>
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/SubCategory.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/WEDDINGWAREHOUSE/ErrorPage.aspx?errorCode=1015'>here</a>.</h2> </body></html>
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/UICategory.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /weddingwarehouse/homepage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fb ...[SNIP]...
4. Cross-domain Referer leakagepreviousnext There are 4 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 /weddingwarehouse/BoutiqueDetail.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=OnSaleKWS(KnotShop)&cId=OnSaleKWS(KnotShop)&cTypF=OS&filter=& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
GET /weddingwarehouse/BoutiqueDetailWithImage.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=Chocolates(KnotShop)&cId=Boutiques(KnotShop)&cTypF=BO&filter=&org=BO& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
GET /weddingwarehouse/ProductPage.aspx?pId=P1984(KnotShop) HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
GET /weddingwarehouse/UICategory.aspx?cId=Favors(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
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.
The response dynamically includes the following script from another domain:
http://www.google-analytics.com/urchin.js
Request
GET / HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The response dynamically includes the following script from another domain:
http://www.google-analytics.com/ga.js
Request
GET /weddingwarehouse/BoutiqueDetail.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=OnSaleKWS(KnotShop)&cId=OnSaleKWS(KnotShop)&cTypF=OS&filter=& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The response dynamically includes the following script from another domain:
http://www.google-analytics.com/ga.js
Request
GET /weddingwarehouse/BoutiqueDetailWithImage.aspx?pVal=0&cTyp=ViewAll&sVal=KSRank&sTyp=Desc&scId=Chocolates(KnotShop)&cId=Boutiques(KnotShop)&cTypF=BO&filter=&org=BO& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
GET /weddingwarehouse/ProductPage.aspx?pId=P1984(KnotShop) HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The response dynamically includes the following script from another domain:
http://www.google-analytics.com/ga.js
Request
GET /weddingwarehouse/UICategory.aspx?cId=Favors(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The response dynamically includes the following script from another domain:
http://www.google-analytics.com/ga.js
Request
GET /weddingwarehouse/homepage.aspx HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
The following email address was disclosed in the response:
availability@adornbrides.com
Issue background
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).
Request
GET /weddingwarehouse/ProductPage.aspx?pId=P1984(KnotShop) HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
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 /weddingwarehouse/SubCategory.aspx?pVal=0&cTyp=ViewAll&sVal=MostPopular&sTyp=Desc&scId=Unique Favors(KnotShop)&cId=Favors(KnotShop)&filter=&sscId=PersonalizedFavors(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 400 Bad Request Content-Type: text/html Date: Sun, 02 Jan 2011 13:58:20 GMT Connection: close Content-Length: 20
GET /weddingwarehouse/UICategory.aspx?scId=Bridesmaid Gifts(KnotShop)&cId=Attendant Gifts(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 400 Bad Request Content-Type: text/html Date: Sun, 02 Jan 2011 13:58:24 GMT Connection: close Content-Length: 20
<h1>Bad Request</h1>
8. Content type incorrectly statedprevious There are 2 instances of this issue:
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.
The response contains the following Content-type statement:
Content-Type: text/html
The response states that it contains HTML. However, it actually appears to contain XML.
Request
GET /weddingwarehouse/SubCategory.aspx?pVal=0&cTyp=ViewAll&sVal=MostPopular&sTyp=Desc&scId=Unique Favors(KnotShop)&cId=Favors(KnotShop)&filter=&sscId=PersonalizedFavors(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 400 Bad Request Content-Type: text/html Date: Sun, 02 Jan 2011 13:58:20 GMT Connection: close Content-Length: 20
The response contains the following Content-type statement:
Content-Type: text/html
The response states that it contains HTML. However, it actually appears to contain XML.
Request
GET /weddingwarehouse/UICategory.aspx?scId=Bridesmaid Gifts(KnotShop)&cId=Attendant Gifts(KnotShop)& HTTP/1.1 Host: weddingshop.theknot.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 400 Bad Request Content-Type: text/html Date: Sun, 02 Jan 2011 13:58:24 GMT Connection: close Content-Length: 20
<h1>Bad Request</h1>
Report generated by XSS.CX at Sun Jan 02 08:24:38 CST 2011.