Vulnerabilities > CVE-2008-5516 - OS Command Injection vulnerability in multiple products

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

The web interface in git (gitweb) 1.5.x before 1.5.5 allows remote attackers to execute arbitrary commands via shell metacharacters related to git_search.

Vulnerable Configurations

Part Description Count
Application
Git
114
Application
Git-Scm
2
OS
Rpath
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Argument Injection
    An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-723-1.NASL
    descriptionIt was discovered that Git did not properly handle long file paths. If a user were tricked into performing commands on a specially crafted Git repository, an attacker could possibly execute arbitrary code with the privileges of the user invoking the program. (CVE-2008-3546) It was discovered that the Git web interface (gitweb) did not correctly handle shell metacharacters when processing certain commands. A remote attacker could send specially crafted commands to the Git server and execute arbitrary code with the privileges of the Git web server. This issue only applied to Ubuntu 7.10 and 8.04 LTS. (CVE-2008-5516, CVE-2008-5517) It was discovered that the Git web interface (gitweb) did not properly restrict the diff.external configuration parameter. A local attacker could exploit this issue and execute arbitrary code with the privileges of the Git web server. This issue only applied to Ubuntu 8.04 LTS and 8.10. (CVE-2008-5916). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id36720
    published2009-04-23
    reporterUbuntu Security Notice (C) 2009-2019 Canonical, Inc. / NASL script (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/36720
    titleUbuntu 6.06 LTS / 7.10 / 8.04 LTS / 8.10 : git-core vulnerabilities (USN-723-1)
  • NASL familyCGI abuses
    NASL idGITWEB_GIT_SEARCH_CMD_EXEC.NASL
    descriptionThe version of gitweb, a web-enabled interface to the open source distributed version control system Git, hosted on the remote web server fails to sanitize user-supplied input to the
    last seen2020-06-01
    modified2020-06-02
    plugin id53336
    published2011-04-08
    reporterThis script is Copyright (C) 2011-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/53336
    titleGIT gitweb git_search Shell Metacharacter Arbitrary Command Execution
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200903-15.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200903-15 (git: Multiple vulnerabilties) Multiple vulnerabilities have been reported in gitweb that is part of the git package: Shell metacharacters related to git_search are not properly sanitized (CVE-2008-5516). Shell metacharacters related to git_snapshot and git_object are not properly sanitized (CVE-2008-5517). The diff.external configuration variable as set in a repository can be executed by gitweb (CVE-2008-5916). Impact : A remote unauthenticated attacker can execute arbitrary commands via shell metacharacters in a query, remote attackers with write access to a git repository configuration can execute arbitrary commands with the privileges of the user running gitweb by modifying the diff.external configuration variable in the repository and sending a crafted query to gitweb. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id35813
    published2009-03-10
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/35813
    titleGLSA-200903-15 : git: Multiple vulnerabilties
  • NASL familySlackware Local Security Checks
    NASL idSLACKWARE_SSA_2009-051-02.NASL
    descriptionNew git packages are available for Slackware 12.0, 12.1, 12.2, and -current to fix security issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id35728
    published2009-02-23
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/35728
    titleSlackware 12.0 / 12.1 / 12.2 / current : git (SSA:2009-051-02)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1708.NASL
    descriptionIt was discovered that gitweb, the web interface for the Git version control system, contained several vulnerabilities : Remote attackers could use crafted requests to execute shell commands on the web server, using the snapshot generation and pickaxe search functionality (CVE-2008-5916 ). Local users with write access to the configuration of a Git repository served by gitweb could cause gitweb to execute arbitrary shell commands with the permission of the web server (CVE-2008-5516, CVE-2008-5517 ).
    last seen2020-06-01
    modified2020-06-02
    plugin id35425
    published2009-01-20
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/35425
    titleDebian DSA-1708-1 : git-core - shell command injection

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/86450/gitweb-exec.txt
idPACKETSTORM:86450
last seen2016-12-05
published2010-02-19
reporterS2 Crew
sourcehttps://packetstormsecurity.com/files/86450/gitWeb-1.x-Remote-Command-Execution.html
titlegitWeb 1.x Remote Command Execution

Seebug

  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:67749
    last seen2017-11-19
    modified2014-07-01
    published2014-07-01
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-67749
    titlegitWeb 1.5.2 - Remote Command Execution
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:19134
    last seen2017-11-19
    modified2010-02-19
    published2010-02-19
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-19134
    titlegitWeb v1.5.2 Remote Command Execution