Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitpython version 3.1.29 has a RCE vulnerability (CVE-2022-24439) #971

Closed
CrypticGuru opened this issue Dec 7, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@CrypticGuru
Copy link

Describe the bug

There is a Remote Code Execution vulnerability in all versions of gitpython.

See: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24439

Reproduction steps

1. Install bandit version 1.7.4
2. It requires gitpython >=1.0.1 (but installs 3.1.29)
3. gitpython 3.1.29 has the reported vulnerability

Expected behavior

Proper input validation for git URLs needs to exist so that it is NOT possible to inject a maliciously crafted remote URL into the clone command.

Bandit version

1.7.4 (Default)

Python version

3.11 (Default)

Additional context

No response

@CrypticGuru CrypticGuru added the bug Something isn't working label Dec 7, 2022
@ericwb
Copy link
Member

ericwb commented Dec 10, 2022

While it is true that Bandit has a dependency on GitPython, it does not use it to do any cloning, nor take a URL argument. The code in particular that uses GitPython is found in the baseline.py module.

@ericwb
Copy link
Member

ericwb commented Dec 10, 2022

Closing for now since GitHub has a new mechanism for reporting potential vulnerabilities. I have just enabled it. In the future you can open one here: https://github.com/PyCQA/bandit/security/advisories

@MisterGlass
Copy link

It looks like gitpython has now patched this vulnerability gitpython-developers/GitPython#1515 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants