CVE-2018-11235: Path Traversal

Published May 29, 2018
·
Updated

A flaw was found in git which allows arbitrary code to be executed when running 'git clone --recurse-submodules (or the deprecated 'git clone --recursive' synonym). A malicious repository can include a .gitmodules submodule config file which points outside of the repository. When git clones such a repository it can be tricked into running hooks within the cloned submodule, which is under the control of the attacker.

References: https://public-inbox.org/git/xmqqy3g2flb6.fsf@gitster-ct.c.googlers.com/ https://www.edwardthomson.com/blog/upgradinggitforcve201811235.html https://news.ycombinator.com/item?id=17181238

Other sources

In Git before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4, and 2.17.x before 2.17.1, remote code execution can occur. With a crafted .gitmodules file, a malicious project can execute an arbitrary script on a machine that runs "git clone --recurse-submodules" because submodule "names" are obtained from this file, and then appended to $GITDIR/modules, leading to directory traversal with "../" in a name. Finally, post-checkout hooks from a submodule are executed, bypassing the intended design in which hooks are not obtained from a remote server.

— Launchpad

Affected Software

43 affected componentsFixes available
Debian Debian Linux=8.0
Debian Debian Linux=9.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=17.10
Canonical Ubuntu Linux=18.04
redhat Enterprise Linux=7.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Eus=7.5
redhat Enterprise Linux Workstation=7.0
git-scm Git<=2.13.6
git-scm Git>=2.14.0<=2.14.3
git-scm Git>=2.15.0<=2.15.1
git-scm Git>=2.16.0<=2.16.3
git-scm Git=2.17.0
Gitforwindows Git<=2.17.1
debian/git
1:2.30.2-1+deb11u21:2.30.2-1+deb11u51:2.39.5-0+deb12u31:2.39.5-0+deb12u21:2.47.3-0+deb13u11:2.51.0-1
redhat/git<2.13.7
2.13.7
redhat/git<2.14.4
2.14.4
redhat/git<2.15.2
2.15.2
redhat/git<2.16.4
2.16.4
redhat/git<2.17.1
2.17.1
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.11.3-r1
2.11.3-r1
alpine/git<2.13.7
2.13.7
alpine/git<2.15.2-r0
2.15.2-r0
alpine/git<2.17.1-r0
2.17.1-r0
alpine/git<2.17.1-r0
2.17.1-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/git to a version that resolves this vulnerability.

    Fixed in 1:2.30.2-1+deb11u2Fixed in 1:2.30.2-1+deb11u5Fixed in 1:2.39.5-0+deb12u3Fixed in 1:2.39.5-0+deb12u2Fixed in 1:2.47.3-0+deb13u1Fixed in 1:2.51.0-1
  2. Upgrade

    Upgrade redhat/git to a version that resolves this vulnerability.

    Fixed in 2.13.7
  3. Upgrade

    Upgrade redhat/git to a version that resolves this vulnerability.

    Fixed in 2.14.4
  4. Upgrade

    Upgrade redhat/git to a version that resolves this vulnerability.

    Fixed in 2.15.2
  5. Upgrade

    Upgrade redhat/git to a version that resolves this vulnerability.

    Fixed in 2.16.4
  6. Upgrade

    Upgrade redhat/git to a version that resolves this vulnerability.

    Fixed in 2.17.1
  7. Upgrade

    Upgrade alpine/git to a version that resolves this vulnerability.

    Fixed in 2.17.1-r0
  8. Upgrade

    Upgrade alpine/git to a version that resolves this vulnerability.

    Fixed in 2.11.3-r1
  9. Upgrade

    Upgrade alpine/git to a version that resolves this vulnerability.

    Fixed in 2.13.7
  10. Upgrade

    Upgrade alpine/git to a version that resolves this vulnerability.

    Fixed in 2.15.2-r0
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.13.7
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.14.4
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.15.2
  14. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.16.4
  15. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.17.1

Event History

May 29, 2018
Data Sourced
11:08 PM
DescriptionSeverityAffected Software
May 30, 2018
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
CVE Published
via MITRE·04:00 AM
Data Sourced
via MITRE·04:00 AM
Description
Data Sourced
via OSV·04:29 AM
DescriptionSeverityAffected Software
May 2, 2020
Data Sourced
12:15 AM
Weakness
Data Sourced
via NVD·12:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
12:15 AM
Affected Software
Sep 9, 2021
Data Sourced
via Red Hat·02:17 PM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·03:42 AM
RemedyAffected Software
Nov 17, 2026
Updated
via OSV·06:30 AM
Affected Software

Frequently Asked Questions

1

What is CVE-2018-11235?

CVE-2018-11235 is a vulnerability in Git versions before 2.17.1 that allows remote code execution.

2

How severe is CVE-2018-11235?

CVE-2018-11235 has a severity rating of 7.8, which is categorized as high.

3

Which versions of Git are affected by CVE-2018-11235?

Git versions before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4, and 2.17.x before 2.17.1 are affected by CVE-2018-11235.

4

How can I fix CVE-2018-11235?

To fix CVE-2018-11235, you should update Git to version 2.17.1 or later.

5

Where can I find more information about CVE-2018-11235?

You can find more information about CVE-2018-11235 at the following references: [http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00003.html](http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00003.html), [http://www.securityfocus.com/bid/104345](http://www.securityfocus.com/bid/104345), [http://www.securitytracker.com/id/1040991](http://www.securitytracker.com/id/1040991).

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