Vulnérabilité dans python-git (UBUNTU-CVE-2023-40590)
Résumé
Vulnérabilité dans python-git (UBUNTU-CVE-2023-40590). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via git.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
GitPython is a python library used to interact with Git repositories. When resolving a program, Python/Windows look for the current working directory, and after that the PATH environment. GitPython defaults to use the git command, if a user runs GitPython from a repo has a git.exe or git executable, that program will be run instead of the one in the user's PATH. This is more of a problem on how Python interacts with Windows systems, Linux and any other OS aren't affected by this. But probably people using GitPython usually run it from the CWD of a repo. An attacker can trick a user to download a repository with a malicious git executable, if the user runs/imports GitPython from that directory, it allows the attacker to run any arbitrary commands. There is no fix currently available for windows users, however there are a few mitigations. 1: Default to an absolute path for the git program on Windows, like C:\\Program Files\\Git\\cmd\\git.EXE (default git path installation). 2: Require users to set the GIT_PYTHON_GIT_EXECUTABLE environment variable on Windows systems. 3: Make this problem prominent in the documentation and advise users to never run GitPython from an untrusted repo, or set the GIT_PYTHON_GIT_EXECUTABLE env var to an absolute path. 4: Resolve the executable manually by only looking into the PATH environment variable.
Source: OSV.dev (Open Source Vulnerabilities) OSV
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée UBUNTU-CVE-2023-40590 a été découverte dans python-git.
Des attaquants peuvent cibler un point d'entrée spécifique comme git à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système.
Action : appliquez le correctif officiel de l'éditeur.
En cas de doute, contactez votre service informatique ou cherchez « python-git UBUNTU-CVE-2023-40590 » sur le site de l'éditeur.
UBUNTU-CVE-2023-40590 (python-git)
Vecteur d'attaque : local / non authentifié
Surface d'attaque : git / git.exe / PATH / GIT_PYTHON_GIT_EXECUTABLE
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (non classée) affecte python-git. Les attaquants atteignent le code vulnérable via git sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de python-git. Surface d'attaque : git / git.exe / PATH / GIT_PYTHON_GIT_EXECUTABLE.
Gravité : ?. L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers la version corrigée selon l'avis éditeur.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'python-git' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
python-gitを grep し、稼働しているサービス・バージョンを把握する。 -
2Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- report ubuntu.com
- report docs.python.org
- report github.com
- report cve.org