{"id":2795,"cve":"CVE-2026-67324","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-67324\/","cwe":"CWE-78","cwe_number":78,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/78","cvss_score":9.3,"published":"2026-08-01","owasp":"A03 Injection","odc":"Checking","cdc":"Missing Check","category":"Input Validation and Sanitization","subcategory":"Command Injection","scope":"Remote","impact":"Arbitrary Code Execution","summary":"GitPython 3.1.50 allows -u to bypass unsafe\u2011option block, enabling malicious upload\u2011pack.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-67324\/","description":"GitPython 3.1.50 fails to recognize joined short-option forms such as -u (the short form of --upload-pack=) when enforcing its default unsafe-option gate. When an application passes attacker-influenced clone options into Repo.clone_from(..., multi_options=..., allow_unsafe_options=False), an attacker can supply -u to bypass the gate that blocks --upload-pack\/-u, causing Git to execute the specified helper command during clone. Fixed in 3.1.51.","solution":"Upgrade GitPython to version\u202f3.1.51 (or later) to apply the fix.","affected_component":"GitPython","fixed_by_upgrading":true,"vulnerable_code":"from git import Repo\n\ndef clone_repository(url: str, dest: str, extra_opts: list):\n    \"\"\"\n    Clone a repository, allowing only safe Git options.\n    `extra_opts` may come from untrusted input.\n    \"\"\"\n    # VULNERABLE: short option -u bypasses unsafe-option gate\n    Repo.clone_from(\n        url,\n        dest,\n        multi_options=extra_opts,\n        allow_unsafe_options=False\n    )\n","patched_code":"from git import Repo\n\ndef clone_repository(url: str, dest: str, extra_opts: list):\n    \"\"\"\n    Clone a repository, allowing only safe Git options.\n    `extra_opts` may come from untrusted input.\n    \"\"\"\n    # FIX: reject short option -u or translate to safe long form\n    safe_opts = [\n        opt for opt in extra_opts\n        if not opt.startswith(\"-u\")  # block short -u\n    ]\n    Repo.clone_from(\n        url,\n        dest,\n        multi_options=safe_opts,\n        allow_unsafe_options=False\n    )\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"gitpython-developers\/gitpython","commit_url":"https:\/\/github.com\/gitpython-developers\/gitpython\/pull\/2162","commit_subject":"fix: block joined short unsafe clone options","units":[{"file":"git\/cmd.py","function":"Git._canonicalize_option_name"}]}],"references":null}