Bug 1496344 (CVE-2017-14867) - CVE-2017-14867 git: cvsserver command injection
Summary: CVE-2017-14867 git: cvsserver command injection
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2017-14867
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1496345
Blocks: 1496346
TreeView+ depends on / blocked
 
Reported: 2017-09-27 06:52 UTC by Andrej Nemec
Modified: 2021-03-11 15:51 UTC (History)
43 users (show)

Fixed In Version: git 2.10.5, git 2.11.4, git 2.12.5, git 2.13.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 21:16:35 UTC
Embargoed:


Attachments (Terms of Use)
git 2.10.4 to 2.10.5 diff (16.48 KB, patch)
2017-10-05 09:47 UTC, Stefan Cornelius
no flags Details | Diff

Description Andrej Nemec 2017-09-27 06:52:14 UTC
The `git` subcommand `cvsserver` is a Perl script which makes excessive use of the backtick operator to invoke `git`. User input is used within some of those invocations. This potentially allows a local attacker to execute arbitrary code.

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

References:

http://seclists.org/oss-sec/2017/q3/534
https://public-inbox.org/git/xmqqy3p29ekj.fsf@gitster.mtv.corp.google.com/

Comment 1 Andrej Nemec 2017-09-27 06:53:08 UTC
Created git tracking bugs for this issue:

Affects: openshift-1 [bug 1496345]

Comment 2 Todd Zullinger 2017-09-27 15:53:34 UTC
For systems to be vulnerable to the attack documented in http://seclists.org/oss-sec/2017/q3/att-534/git_cvsserver.txt the git-cvs package must be installed.  Most modern git servers will not need git-cvs and could remove it to mitigate the vulnerability.

Comment 3 Todd Zullinger 2017-09-28 15:38:07 UTC
This issue has now been assigned CVE-2017-14867, as noted in http://seclists.org/oss-sec/2017/q3/568.

Comment 4 Stefan Cornelius 2017-10-05 09:47:37 UTC
Created attachment 1334729 [details]
git 2.10.4 to 2.10.5 diff

Diff of 2.10.4 to 2.10.5. Linking individual commits is a bit messy in this case, so this seems to be the next best option.

Comment 6 Stefan Cornelius 2017-10-05 11:15:45 UTC
Mitigation:

In case you do not rely on the commands offered by the "-cvs" subpackage (for example "git cvsserver" or "git cvsimport") on RHEL or RHSCL, you can uninstall the git "-cvs" subpackage.

Comment 8 Product Security DevOps Team 2020-05-20 21:16:35 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2017-14867


Note You need to log in before you can comment on or make changes to this bug.