GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CVE-2022-24439: `<gitpython::clone> 'ext::sh -c touch% /tmp/pwned'` for remote code execution · Issue #1515 · gitpython-developers/GitPython

CVE-2022-24439: <gitpython::clone> 'ext::sh -c touch% /tmp/pwned' for remote code execution #1515

New issue
Copy link
New issue
Copy link
Closed
#1521
Closed
CVE-2022-24439: <gitpython::clone> 'ext::sh -c touch% /tmp/pwned' for remote code execution#1515
#1521
Copy link
Labels
acknowledgedcriticalhelp wanted

Description

@mmuehlenhoff
mmuehlenhoff
opened on Dec 6, 2022
Issue body actions

This appeared in the CVE feed today: https://security.snyk.io/vuln/SNYK-PYTHON-GITPYTHON-3113858

Not sure if this was reported to you before or not, reporting it here just in case.

Reacted by brampurnot, Ayush Shah, offa, Behnaz Hassanshahi, Matt Morris and Setu Shah

Activity

Next
  1. Byron commented on Dec 6, 2022

    @Byron
    Byron
    on Dec 6, 2022
    Member
    More actions

    I am aware, have been informed and we can track it here. Thanks a lot for setting up this issue so timely.

  2. Byron
    added
    acknowledged
    critical
    help wanted
    on Dec 6, 2022
  3. Byron
    changed the title [-]CVE-2022-24439[/-] [+]CVE-2022-24439: `<gitpython::clone> 'ext::sh -c touch% /tmp/pwned'` for remote code execution[/+] on Dec 6, 2022
  4. ajakk commented on Dec 6, 2022

    @ajakk
    ajakk
    on Dec 6, 2022
    More actions

    @Byron, had Snyk or Sam Wheating (@SamWheating?) contacted you previously about this or did you learn about it independently? I'm curious given there's no reference to any upstream report in the above Snyk report.

    Reacted by Santos Gallegos
  5. SamWheating commented on Dec 6, 2022

    @SamWheating
    SamWheating
    on Dec 6, 2022
    More actions

    I reached out to Snyk, who I believe got in touch with the maintainers.

  6. ajakk commented on Dec 6, 2022

    @ajakk
    ajakk
    on Dec 6, 2022
    More actions

    I reached out to Snyk, who I believe got in touch with the maintainers.

    What makes you think that? Again, just curious given there doesn't seem to be any indication of that happening according to their report. Also, why did you go to Snyk rather than to upstream?

  7. Byron commented on Dec 6, 2022

    @Byron
    Byron
    on Dec 6, 2022
    Member
    More actions

    Snyk did reach out to me by email, to my mind all this went pretty well. By publishing the issue the community can contribute a mitigation.

  8. ajakk commented on Dec 6, 2022

    @ajakk
    ajakk
    on Dec 6, 2022
    More actions

    Yeah, seems fine to me. It would have been nice to have an existing public report to go with the public release of the CVE so that all the people who handle CVEs (myself, and the reporter of this issue, for example) would know that the issue is already known to upstream and we don't have to spend time extracting that information via issues like this.

    Thank you for the insight.

  9. stsewd commented on Dec 6, 2022

    @stsewd
    stsewd
    on Dec 6, 2022
    Contributor
    More actions

    Looks like this same vulnerability has been reported in another git library (simple-git), https://www.cve.org/CVERecord?id=CVE-2022-25912.

    They added an option to opt-in in to the insecure behavior

    • https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-UNSAFE-ACTIONS.md#overriding-allowed-protocols
    • https://github.com/steveukx/git-js/blob/de570acd052660bad0165347de5d2f86a494ae1b/simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts

    And this should probably check for https://www.cve.org/CVERecord?id=CVE-2022-24433 too (git clone file:///tmp/zero123 /tmp/example-new-repo --upload-pack='touch /tmp/pwn')

    https://github.com/steveukx/git-js/blob/fc10fbe1cba2dedfccd8e5507b61fc979addb252/simple-git/src/lib/tasks/clone.ts#L46-L49

    Reacted by Sebastian Thiel
  10. SamWheating commented on Dec 6, 2022

    @SamWheating
    SamWheating
    on Dec 6, 2022
    More actions

    What makes you think that? Again, just curious given there doesn't seem to be any indication of that happening according to their report. Also, why did you go to Snyk rather than to upstream?

    Snyk's vulnerability program is fantastic - you can report an issue to them and they will review it, triage it, try to get in contact with the maintainers and then register the CVE if applicable. It eliminates a lot of the overhead on my end and helps to ensure that a vulnerability is handled appropriately.

    https://docs.snyk.io/more-info/disclosing-vulnerabilities/disclose-a-vulnerability-in-an-open-source-package

    I didn't have a direct line to the maintainers and I didn't want to open a public issue explaining a potentially sensitive vulnerability. In this case it sounds like Snyk was able to get in touch on my behalf and handle this disclosure responsibly.

    Reacted by Justin Kiggins, PhD, Mohamed El Mouctar HAIDARA, Idan and AbnomariltyInR34l17y
  11. jacwalte commented on Dec 8, 2022

    @jacwalte
    jacwalte
    on Dec 8, 2022
    More actions

    Just thought I would ping to keep this issue active. This is a critical issue in my org. Can we get a status update? Is a fix expected soon?

  12. Byron commented on Dec 8, 2022

    @Byron
    Byron
    on Dec 8, 2022
    Member
    More actions

    No fix is planned I don't plan to work on this directly, and this issue is triaged as 'help wanted'. Indirectly I am working on it by answering here and following up on the PR which might alleviate the problem.

    Reacted by Charles Perrot-Minot, Tyler Vick, Emily Coffin, Joran R. Angevaare, Ülgen Sarıkavak and Kamyar Mohajerani
    Reacted by Sebastian Thiel
  13. s-t-e-v-e-n-k
    added a commit that references this issue on Dec 13, 2022

    Quote URLs in Repo.clone_from()

    This issue will close once commit 03753c0 is merged into the 'main' branch.
    03753c0
  14. 22 remaining items

  15. Byron commented on Dec 29, 2022

    @Byron
    Byron
    on Dec 29, 2022
    Member
    More actions

    A new release was created to incorporate many security related fixes.

    A special thanks goes to @stsewd who was a driving force behind implementing the fixes, and to the fine folks who discovered it.

    I hope this makes the upcoming year 2023 a little more secure for everyone 🎉.

    Reacted by Matt Morris, Steffen Schulz and Kevin Bowen
    Reacted by Santos Gallegos and Manuel Kaufmann
  16. ajakk commented on Dec 30, 2022

    @ajakk
    ajakk
    on Dec 30, 2022
    More actions

    A new release was created to incorporate many security related fixes.

    A special thanks goes to @stsewd who was a driving force behind implementing the fixes, and to the fine folks who discovered it.

    I hope this makes the upcoming year 2023 a little more secure for everyone tada.

    Can a release be made in Github? I imagine a nonzero number of people are watching for releases in this repository who aren't subscribed to this issue to be aware of the security impact of this release.

    Reacted by Aaron Bach and offa
  17. Byron commented on Dec 31, 2022

    @Byron
    Byron
    on Dec 31, 2022
    Member
    More actions

    Thanks for the hint. That should be done now.

  18. openstack-mirroring
    added 2 commits that reference this issue on Jan 10, 2023

    Update git submodules

    083384d

    Bump GitPython to 3.1.30

    614ef65
  19. netbsd-srcmastr
    added a commit that references this issue on Jan 20, 2023

    py-gitpython: updated to 3.1.30

    8b50322
  20. EliahKagan
    added 5 commits that reference this issue on Nov 16, 2023

    Mark unsafe-options "allowed" tests xfail on Windows

    7074aa9

    Mark unsafe-options "allowed" tests xfail on Windows

    96dea80

    Mark unsafe-options "allowed" tests xfail on Windows

    9bec3ee

    Mark unsafe-options "allowed" tests xfail on Windows

    5561e62

    Mark unsafe-options "allowed" tests xfail on Windows

    b83ce1b
  21. EliahKagan
    added a commit that references this issue on Nov 24, 2023

    Mark unsafe-options "allowed" tests xfail on Windows

    61d1fba
  22. msk
    added a commit that references this issue on May 11, 2026

    py-gitpython: updated to 3.1.30

    48cfecd
  23. jperkin
    added a commit that references this issue on May 14, 2026

    py-gitpython: updated to 3.1.30

    8a4a2e7
  24. tsutsui
    added a commit that references this issue on Oct 17, 2026

    py-gitpython: updated to 3.1.30

    e7f168a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedcriticalhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.