exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ViewGit 0.0.6 Cross Site Scripting

ViewGit 0.0.6 Cross Site Scripting
Posted Mar 19, 2013
Authored by Matthew R. Bucci

ViewGit version 0.0.6 suffers from multiple persistent cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss
advisories | CVE-2013-2294
SHA-256 | 20c97073d97750300a2356a5164432b210fc3c10d3b8e7ff551f05ed56a0236a

ViewGit 0.0.6 Cross Site Scripting

Change Mirror Download
Vulnerability Report

Author: Matthew R. Bucci <bucci@sas.upenn.edu>
Date: 18 March, 2013

CVE-2013-2294

Description of Vulnerability:
-----------------------------
ViewGit "is a git web repository viewer that aims to be easy to set up
and upgrade, light on dependencies, and comfortable to use."
(http://viewgit.fealdia.org/).
ViewGit contains multiple persistent arbitrary script injection (XSS)
vulnerabilities in its "Shortlog" and "Heads" tables. These
vulnerabilities are triggered by malicious data inserted via the branch
or tag systems of git by one of the users of the repository.

Systems affected:
-----------------
ViewGit 0.0.6 installed on CentOS 6.3 with PHP 5.3.3 and Apache 2.2.15
was tested and shown to be vulnerable.

Impact:
-------
Users viewing the ViewGit web interface could be exposed to arbitrary
HTML source authored by an attacker, including malicious Flash or Java
objects, remotely sourced iFrame tags, malicious JavaScript, or other
content, that would be associated with the trust zone of the ViewGit web
interface. This could result in bypass of cross site request forgery
mitigation, account compromise, drive by download attacks or other
impacts. For more information about the potential impacts of client side
attacks see the BeEF Project at http://beefproject.com/.

Mitigating factors:
-------------------
In order to inject arbitrary script, attackers must have the ability to
manipulate the git repository. Specifically, the attacker must be able
to create branches or tags.

Proof of Concept Exploit:
-------------------------
Javascript commands, the most simple being
<script>alert("XSS")</script>, can be used as the name for either a tag
or branch in any given repository and subsequently executed by pulling
them up in ViewGit's web interface. Tag names will be executed when
viewing the "Shortlog" table, and branch names will be executed when
viewing the "Shortlog" or "Heads" tables.

Steps to Reproduce:
-------------------
There are two different avenues of attack, so here are two different
ways to reproduce the attack:

Branch name exploit:
1. Create a git repository and initialize it with "git init".
2. Add this repository to ViewGit by editing its localconfig.php file
and adding it to the 'projects' array.
3. Now, add a file to the repository and commit it with the commands
"git add fileName" and "git commit"
4. Add a branch via the command "git branch '<script>alert("XSS")</script>'"
5. Navigate to viewgit/?a=summary&p=X where X is the name of the
repository you set up.
6. Observe the Javascript pop-up.
7. Note that this same pop-up will appear when navigating to
viewgit/?a=shortlog&p=X, where X is the name of the repository you set
up, for the same reason because both pages use the same "Shortlog"
table. Thus both problems are also fixed by the same patch.

Tag name exploit:
1. Create a git repository and initialize it with "git init".
2. Add this repository to ViewGit by editing its localconfig.php file
and adding it to the 'projects' array.
3. Now, add a file to the repository and commit it with the commands
"git add fileName" and "git commit"
4. Add a tag via the command "git tag -a '<script>alert("XSS")</script>'
-m "Message""
5. Navigate to viewgit/?a=summary&p=X where X is the name of the
repository you set up.
6. Observe the Javascript pop-up.
7. Note that this same pop-up will appear when navigating to
viewgit/?a=shortlog&p=X, where X is the name of the repository you set
up, for the same reason because both pages use the same "Shortlog"
table. Thus both problems are also fixed by the same patch.

Vendor Response:
----------------
Vendor has been alerted to this vulnerability and has applied the
suggested patches to ViewGit version 0.0.7

Timeline:
---------
March 5th, Vulnerability discovered
March 5th, Vendor contact established
March 11th, Vendor provided with technical details
March 13th, Vendor acknowledged issue
March 16th, Patch committed in main branch of the ViewGit project by vendor
March 18th, Public release of advisory


Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close