gitpython Package Vulnerability: Arbitrary File Read Risk
- Severity
- HIGH
- Affected component
- gitpython (pypi)
- Affected versions
- >= 3.1.44, <= 3.1.44 or >= 3.1.43, <= 3.1.43 or >= 3.1.42, <= 3.1.42 or >= 3.1.41, <= 3.1.41 or >= 3.1.40, <= 3.1.40 or >= 3.1.38, <= 3.1.38 or >= 3.1.35, <= 3.1.35 or >= 3.1.34, <= 3.1.34 or >= 3.1.33, <= 3.1.33 or >= 3.1.32, <= 3.1.32 or >= 3.1.31, <= 3.1.31 or >= 3.1.30, <= 3.1.30
- Patched version
- Not yet available
An early warning has been issued for a vulnerability in the gitpython package that allows for arbitrary file read due to an incomplete fix of a previous vulnerability. This can lead to local file read at the privileges of the host process.
What happened
The vulnerability in gitpython reportedly allows for arbitrary file read due to an incomplete fix of a previous vulnerability. This can lead to local file read at the privileges of the host process. The vulnerability is tracked under CVE-2026-42215, GHSA-3F7W-8RR8-F37F, and GHSA-3WXW-XV34-2FRG. The issue was first flagged on 2026-09-08T19:42:22+00:00.
The vulnerability is associated with the incomplete fix of a previous issue where TagReference.create positional reference bypassed the kwargs-only --file guard, enabling arbitrary file read. This issue is under investigation and has not yet been exploited in the wild.
What to do about it
- Monitor for updates to the gitpython package.
- Apply patches as they become available.
- No official fix has been published yet. Monitor the sources below for updates.
How 0Day would have caught this
gitpython is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.
Frequently asked questions
Am I affected?
You are affected if you are using gitpython (pypi) version >= 3.1.44, <= 3.1.44 or >= 3.1.43, <= 3.1.43 or >= 3.1.42, <= 3.1.42 or >= 3.1.41, <= 3.1.41 or >= 3.1.40, <= 3.1.40 or >= 3.1.38, <= 3.1.38 or >= 3.1.35, <= 3.1.35 or >= 3.1.34, <= 3.1.34 or >= 3.1.33, <= 3.1.33 or >= 3.1.32, <= 3.1.32 or >= 3.1.31, <= 3.1.31 or >= 3.1.30, <= 3.1.30.
What should I do right now?
Monitor for updates to the gitpython package and apply patches as they become available.
Has this been exploited in the wild?
No, this vulnerability has not been exploited in the wild.
Sources
- [GHSA-284h-m62q-gf8w] GitPython: Dormant multi-line git-config values are corrupted into live injected directives (e.g. core.hooksPath) on any unrelated GitConfigParser write, enabling RCE
- [GHSA-284h-m62q-gf8w] GitPython: Dormant multi-line git-config values are corrupted into live injected directives (e.g. core.hooksPath) on any unrelated GitConfigParser write, enabling RCE
- [GHSA-3wxw-xv34-2frg] GitPython: TagReference.create positional reference bypasses kwargs-only --file guard, enabling arbitrary file read (incomplete fix of 3af0c251)