CVE-2017-8386: High severity git shell vulnerability

Published May 12, 2017
·
Updated

A vulnerability was found in git concerning the git shell. A user who comes over SSH could run an interactive pager by causing it to spawn "git upload-pack --help".

"git-shell" is a restricted login shell that can be used on a server to prevent SSH clients from running any programs except those needed for git fetches and pushes. If you are not running a server, or if your server has not been explicitly configured to use git-shell as a login shell, you are not affected.

Upstream patch:

https://kernel.googlesource.com/pub/scm/git/git/+/3ec804490a265f4c418a321428c12f3f18b7eff5

References:

https://insinuator.net/2017/05/git-shell-bypass-by-abusing-less-cve-2017-8386/ http://public-inbox.org/git/xmqq8tm5ziat.fsf@gitster.mtv.corp.google.com/

Other sources

git-shell in git before 2.4.12, 2.5.x before 2.5.6, 2.6.x before 2.6.7, 2.7.x before 2.7.5, 2.8.x before 2.8.5, 2.9.x before 2.9.4, 2.10.x before 2.10.3, 2.11.x before 2.11.2, and 2.12.x before 2.12.3 might allow remote authenticated users to gain privileges via a repository name that starts with a - (dash) character.

MITRE

Affected Software

19 affected componentsFixes available
redhat/git<2.4.12
2.4.12
redhat/git<2.5.6
2.5.6
redhat/git<2.6.7
2.6.7
redhat/git<2.7.5
2.7.5
redhat/git<2.8.5
2.8.5
redhat/git<2.9.4
2.9.4
redhat/git<2.10.3
2.10.3
redhat/git<2.11.2
2.11.2
redhat/git<2.12.3
2.12.3
Git git-shell
openSUSE Leap=42.1
Debian Debian Linux=8.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=16.10
Canonical Ubuntu Linux=17.04
Fedoraproject Fedora=24
Fedoraproject Fedora=25
Fedoraproject Fedora=26

Event History

Jun 1, 2017
CVE Published
via MITRE·04:00 PM
Data Sourced
via MITRE·04:00 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2017-8386?

CVE-2017-8386 has been classified as a medium-level vulnerability that can allow remote authenticated users to gain elevated privileges.

2

How do I fix CVE-2017-8386?

To fix CVE-2017-8386, update your git installation to a version greater than or equal to the latest patched version, based on your distribution.

3

Which versions of git are affected by CVE-2017-8386?

CVE-2017-8386 affects git versions before 2.4.12, 2.5.x before 2.5.6, 2.6.x before 2.6.7, and several other versions before their respective patched releases.

4

What systems are impacted by CVE-2017-8386?

CVE-2017-8386 can impact systems running affected versions of git across various distributions, including Debian, Ubuntu, and Fedora.

5

Can CVE-2017-8386 be exploited remotely?

Yes, CVE-2017-8386 can be exploited by remote authenticated users through specific repository names.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203