7.8
CWE
426
Advisory Published
Updated

CVE-2021-21237: Git LFS can execute a Git binary from the current directory on Windows

First published: Fri Jan 15 2021(Updated: )

Git LFS is a command line extension for managing large files with Git. On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems. This is the result of an incomplete fix for CVE-2020-27955. This issue occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator. Other than avoiding untrusted repositories or using a different operating system, there is no workaround. This is fixed in v2.13.2.

Credit: security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Git Large File Storage<2.13.2

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2021-21237?

    CVE-2021-21237 has a high severity rating due to its potential to allow arbitrary code execution.

  • How do I fix CVE-2021-21237?

    To fix CVE-2021-21237, update Git LFS to version 2.13.2 or later.

  • What are the consequences of exploiting CVE-2021-21237?

    Exploiting CVE-2021-21237 allows an attacker to execute arbitrary code on the victim's system.

  • Which versions of Git LFS are affected by CVE-2021-21237?

    CVE-2021-21237 affects Git LFS versions prior to 2.13.2.

  • Where does CVE-2021-21237 pose a risk?

    CVE-2021-21237 poses a risk primarily on Windows systems when using malicious repositories.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203