SQL Injection, CWE-89, CAPEC-66, Single Quote, Database Error

SQL Injection in Host pixel.yola.com | Vulnerability Crawler Report

Report generated by CloudScan Vulnerability Crawler at Thu Feb 10 13:41:50 CST 2011.



DORK CWE-79 XSS Report

Loading

1. SQL injection

1.1. http://pixel.yola.com/LoggingAgent/LoggingAgent [Referer HTTP header]

1.2. http://pixel.yola.com/LoggingAgent/LoggingAgent [sitereferer parameter]

2. Cookie without HttpOnly flag set

2.1. http://pixel.yola.com/LoggingAgent/LoggingAgent

2.2. http://pixel.yola.com/favicon.ico

3. HTML does not specify charset



1. SQL injection  next
There are 2 instances of this issue:

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.

Issue remediation

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:



1.1. http://pixel.yola.com/LoggingAgent/LoggingAgent [Referer HTTP header]  next

Summary

Severity:   High
Confidence:   Tentative
Host:   http://pixel.yola.com
Path:   /LoggingAgent/LoggingAgent

Issue detail

The Referer HTTP header appears to be vulnerable to SQL injection attacks. A single quote was submitted in the Referer HTTP header, 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.

Request 1

GET /LoggingAgent/LoggingAgent?url=//antifung.yolasite.com/&pagename=index&siteid=8a4986cb2dc8c27e012dcd5a0c3a4596&resolution=1920x1200&colorDepth=16&flash=1&java=1&sitereferer=&visitorId=C4A762FB-9ED0-0001-2F15-1374B3C317AE&visitId=C4A762FB-9EE0-0001-23F0-168637A01F71&LoggingAgentReturnType=script HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Referer: http://www.google.com/search?hl=en&q='
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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 1

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
ntCoent-Length: 2557
Date: Thu, 10 Feb 2011 17:01:10 GMT
X-Varnish: 645166284
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: MISS
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 2557

<html><head><title>JBossWeb/2.0.1.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-se
...[SNIP]...
</b> Exception report</p>
...[SNIP]...
<u>The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.</u>
...[SNIP]...

Request 2

GET /LoggingAgent/LoggingAgent?url=//antifung.yolasite.com/&pagename=index&siteid=8a4986cb2dc8c27e012dcd5a0c3a4596&resolution=1920x1200&colorDepth=16&flash=1&java=1&sitereferer=&visitorId=C4A762FB-9ED0-0001-2F15-1374B3C317AE&visitId=C4A762FB-9EE0-0001-23F0-168637A01F71&LoggingAgentReturnType=script HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Referer: http://www.google.com/search?hl=en&q=''
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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 2

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
Pragma: no-cache
Expires: -1
Content-Type: application/x-javascript;charset=ISO-8859-1
Cteonnt-Length: 18
Date: Thu, 10 Feb 2011 17:01:11 GMT
X-Varnish: 645166389
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: MISS
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 18

//logged by Abacus

1.2. http://pixel.yola.com/LoggingAgent/LoggingAgent [sitereferer parameter]  previous  next

Summary

Severity:   High
Confidence:   Tentative
Host:   http://pixel.yola.com
Path:   /LoggingAgent/LoggingAgent

Issue detail

The sitereferer parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the sitereferer 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.

Request 1

GET /LoggingAgent/LoggingAgent?url=//antifung.yolasite.com/&pagename=index&siteid=8a4986cb2dc8c27e012dcd5a0c3a4596&resolution=1920x1200&colorDepth=16&flash=1&java=1&sitereferer='&visitorId=C4A762FB-9ED0-0001-2F15-1374B3C317AE&visitId=C4A762FB-9EE0-0001-23F0-168637A01F71&LoggingAgentReturnType=script HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Referer: http://antifung.yolasite.com/
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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 1

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
ntCoent-Length: 2557
Date: Thu, 10 Feb 2011 17:00:40 GMT
X-Varnish: 645162528
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: MISS
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 2557

<html><head><title>JBossWeb/2.0.1.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-se
...[SNIP]...
</b> Exception report</p>
...[SNIP]...
<u>The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.</u>
...[SNIP]...

Request 2

GET /LoggingAgent/LoggingAgent?url=//antifung.yolasite.com/&pagename=index&siteid=8a4986cb2dc8c27e012dcd5a0c3a4596&resolution=1920x1200&colorDepth=16&flash=1&java=1&sitereferer=''&visitorId=C4A762FB-9ED0-0001-2F15-1374B3C317AE&visitId=C4A762FB-9EE0-0001-23F0-168637A01F71&LoggingAgentReturnType=script HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Referer: http://antifung.yolasite.com/
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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 2

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
Pragma: no-cache
Expires: -1
Content-Type: application/x-javascript;charset=ISO-8859-1
Cteonnt-Length: 18
Date: Thu, 10 Feb 2011 17:00:41 GMT
X-Varnish: 645162697
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: MISS
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 18

//logged by Abacus

2. Cookie without HttpOnly flag set  previous  next
There are 2 instances of this issue:

Issue background

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.



2.1. http://pixel.yola.com/LoggingAgent/LoggingAgent  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://pixel.yola.com
Path:   /LoggingAgent/LoggingAgent

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set: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 /LoggingAgent/LoggingAgent?url=//infert.yolasite.com/&pagename=index&siteid=8a4986c82dc8c274012dcef0ba811d6e&resolution=1920x1200&colorDepth=16&flash=1&java=1&sitereferer=&visitorId=C4A762FC-34B0-0001-1BB0-19A685B01680&visitId=C4A762FC-34C0-0001-F593-CB3089C097E0&LoggingAgentReturnType=script HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Referer: http://infert.yolasite.com/
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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: Coyote-2-ac9068e=ac90680:0

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
Pragma: no-cache
Expires: -1
Content-Type: application/x-javascript;charset=ISO-8859-1
Cteonnt-Length: 18
Date: Thu, 10 Feb 2011 16:59:24 GMT
X-Varnish: 645154230
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: MISS
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 18

//logged by Abacus

2.2. http://pixel.yola.com/favicon.ico  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://pixel.yola.com
Path:   /favicon.ico

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set: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 /favicon.ico HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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: Coyote-2-ac9068e=ac90680:0

Response

HTTP/1.1 404 Not Found
SynthaSite-ID: hs5 (127.0.10.5)
Content-Type: text/html
Server: lighttpd/1.5.0
ntCoent-Length: 213
Date: Thu, 10 Feb 2011 17:03:34 GMT
X-Varnish: 645181986 645181825
Age: 1
Via: 1.1 varnish
Connection: keep-alive
X-Cache: HIT
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 213

<div style='background-color: #f3f3f3;border: 1px solid #ccc;width:400px;margin-left:auto;margin-right:auto;margin-top:100px;padding:10px;font-family:verdana;'>
404. Sorry, we can't seem to find that
...[SNIP]...

3. HTML does not specify charset  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://pixel.yola.com
Path:   /favicon.ico

Issue description

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.

Request

GET /favicon.ico HTTP/1.1
Host: pixel.yola.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13
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: Coyote-2-ac9068e=ac90680:0

Response

HTTP/1.1 404 Not Found
SynthaSite-ID: hs5 (127.0.10.5)
Content-Type: text/html
Server: lighttpd/1.5.0
ntCoent-Length: 213
Date: Thu, 10 Feb 2011 17:03:34 GMT
X-Varnish: 645181986 645181825
Age: 1
Via: 1.1 varnish
Connection: keep-alive
X-Cache: HIT
Set-Cookie: Coyote-2-ac9068e=ac90680:0; path=/
Cache-Control: private
Content-Length: 213

<div style='background-color: #f3f3f3;border: 1px solid #ccc;width:400px;margin-left:auto;margin-right:auto;margin-top:100px;padding:10px;font-family:verdana;'>
404. Sorry, we can't seem to find that
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Thu Feb 10 13:41:50 CST 2011.