Vulnerabilities > CVE-2008-5516 - OS Command Injection vulnerability in multiple products
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
Common Weakness Enumeration (CWE)
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 family Ubuntu Local Security Checks NASL id UBUNTU_USN-723-1.NASL description It 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 seen 2020-06-01 modified 2020-06-02 plugin id 36720 published 2009-04-23 reporter Ubuntu Security Notice (C) 2009-2019 Canonical, Inc. / NASL script (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/36720 title Ubuntu 6.06 LTS / 7.10 / 8.04 LTS / 8.10 : git-core vulnerabilities (USN-723-1) NASL family CGI abuses NASL id GITWEB_GIT_SEARCH_CMD_EXEC.NASL description The 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 seen 2020-06-01 modified 2020-06-02 plugin id 53336 published 2011-04-08 reporter This script is Copyright (C) 2011-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/53336 title GIT gitweb git_search Shell Metacharacter Arbitrary Command Execution NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-200903-15.NASL description The 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 seen 2020-06-01 modified 2020-06-02 plugin id 35813 published 2009-03-10 reporter This script is Copyright (C) 2009-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/35813 title GLSA-200903-15 : git: Multiple vulnerabilties NASL family Slackware Local Security Checks NASL id SLACKWARE_SSA_2009-051-02.NASL description New git packages are available for Slackware 12.0, 12.1, 12.2, and -current to fix security issues. last seen 2020-06-01 modified 2020-06-02 plugin id 35728 published 2009-02-23 reporter This script is Copyright (C) 2009-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/35728 title Slackware 12.0 / 12.1 / 12.2 / current : git (SSA:2009-051-02) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-1708.NASL description It 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 seen 2020-06-01 modified 2020-06-02 plugin id 35425 published 2009-01-20 reporter This script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/35425 title Debian DSA-1708-1 : git-core - shell command injection
Packetstorm
data source | https://packetstormsecurity.com/files/download/86450/gitweb-exec.txt |
id | PACKETSTORM:86450 |
last seen | 2016-12-05 |
published | 2010-02-19 |
reporter | S2 Crew |
source | https://packetstormsecurity.com/files/86450/gitWeb-1.x-Remote-Command-Execution.html |
title | gitWeb 1.x Remote Command Execution |
Seebug
bulletinFamily exploit description No description provided by source. id SSV:67749 last seen 2017-11-19 modified 2014-07-01 published 2014-07-01 reporter Root source https://www.seebug.org/vuldb/ssvid-67749 title gitWeb 1.5.2 - Remote Command Execution bulletinFamily exploit description No description provided by source. id SSV:19134 last seen 2017-11-19 modified 2010-02-19 published 2010-02-19 reporter Root source https://www.seebug.org/vuldb/ssvid-19134 title gitWeb v1.5.2 Remote Command Execution
References
- http://wiki.rpath.com/Advisories:rPSA-2009-0005
- https://issues.rpath.com/browse/RPL-2936
- https://bugzilla.redhat.com/show_bug.cgi?id=479715
- http://www.openwall.com/lists/oss-security/2009/01/20/1
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512330
- http://www.openwall.com/lists/oss-security/2009/01/21/7
- http://lists.opensuse.org/opensuse-security-announce/2009-01/msg00002.html
- http://www.debian.org/security/2009/dsa-1708
- http://securityreason.com/securityalert/4919
- http://www.openwall.com/lists/oss-security/2009/01/23/2
- http://www.ubuntu.com/usn/USN-723-1
- http://secunia.com/advisories/33964
- http://www.gentoo.org/security/en/glsa/glsa-200903-15.xml
- http://secunia.com/advisories/34194
- http://www.vupen.com/english/advisories/2009/0175
- http://www.securityfocus.com/archive/1/500008/100/0/threaded
- http://repo.or.cz/w/git.git?a=commitdiff%3Bh=c582abae