Action not permitted
Modal body text goes here.
Modal Title
Modal Body
PYSEC-2026-3983
Vulnerability from pysec - Published: 2026-09-09 12:17 - Updated: 2026-10-01 16:51GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.
| Name | purl | gitpython | pkg:pypi/gitpython |
|---|
{
"affected": [
{
"ecosystem_specific": {},
"package": {
"ecosystem": "PyPI",
"name": "gitpython",
"purl": "pkg:pypi/gitpython"
},
"ranges": [
{
"events": [
{
"introduced": "3.1.59"
},
{
"fixed": "3.1.60"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.1.59"
]
}
],
"aliases": [
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x",
"GHSA-rw58-wc66-99g4"
],
"details": "GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.",
"id": "PYSEC-2026-3983",
"modified": "2026-10-01T16:51:17.921477Z",
"published": "2026-09-09T12:17:16.980Z",
"references": [
{
"type": "ADVISORY",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
},
{
"type": "EVIDENCE",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-rw58-wc66-99g4"
}
],
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"withdrawn": "2026-10-01T16:51:17.921477Z"
}
BREW-CHECKOV-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 15:11 – Updated: 2026-10-01 11:03 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "checkov",
"purl": "pkg:brew/checkov"
},
"ranges": [
{
"events": [
{
"introduced": "3.3.10"
},
{
"fixed": "3.3.10_1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-checkov-CVE-2026-87818",
"modified": "2026-10-01T11:03:46Z",
"published": "2026-09-18T15:11:41Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-CYCODE-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 15:20 – Updated: 2026-10-01 09:35 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "cycode",
"purl": "pkg:brew/cycode"
},
"ranges": [
{
"events": [
{
"introduced": "3.19.1"
},
{
"fixed": "3.22.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-cycode-CVE-2026-87818",
"modified": "2026-10-01T09:35:25Z",
"published": "2026-09-18T15:20:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-DSTACK-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 15:26 – Updated: 2026-10-01 09:15 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "dstack",
"purl": "pkg:brew/dstack"
},
"ranges": [
{
"events": [
{
"introduced": "0.21.1"
},
{
"fixed": "0.21.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-dstack-CVE-2026-87818",
"modified": "2026-10-01T09:15:27Z",
"published": "2026-09-18T15:26:34Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-JIRATUI-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 16:09 – Updated: 2026-10-01 10:07 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "jiratui",
"purl": "pkg:brew/jiratui"
},
"ranges": [
{
"events": [
{
"introduced": "1.13.0"
},
{
"fixed": "1.13.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-jiratui-CVE-2026-87818",
"modified": "2026-10-01T10:07:17Z",
"published": "2026-09-18T16:09:47Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-PYGITUP-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 17:40 – Updated: 2026-10-01 09:35 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "pygitup",
"purl": "pkg:brew/pygitup"
},
"ranges": [
{
"events": [
{
"introduced": "2.5.0"
},
{
"fixed": "2.5.0_1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-pygitup-CVE-2026-87818",
"modified": "2026-10-01T09:35:46Z",
"published": "2026-09-18T17:40:53Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-SNAKEMAKE-CVE-2026-87818 (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 18:39 – Updated: 2026-10-01 11:43 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "snakemake",
"purl": "pkg:brew/snakemake"
},
"ranges": [
{
"events": [
{
"introduced": "9.25.2"
},
{
"fixed": "9.26.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-snakemake-CVE-2026-87818",
"modified": "2026-10-01T11:43:20Z",
"published": "2026-09-18T18:39:20Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-SNOWFLAKE-CLI-CVE-2… (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 18:42 – Updated: 2026-10-01 10:11 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.62",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "snowflake-cli",
"purl": "pkg:brew/snowflake-cli"
},
"ranges": [
{
"events": [
{
"introduced": "3.27.0"
},
{
"fixed": "3.28.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.62",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.62"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-snowflake-cli-CVE-2026-87818",
"modified": "2026-10-01T10:11:40Z",
"published": "2026-09-18T18:42:06Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
BREW-STANDARDEBOOKS-CVE-… (PYSEC-2026-3983)
Vulnerability from osv_homebrew – Published: 2026-09-18 18:55 – Updated: 2026-10-01 09:19 – Source websiteSummary
GitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.
However, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.
--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.
When combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.
This was reproduced against the published GitPython 3.1.59 wheel.
The original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.
Details
Confirmed API surface:
repo.index.diff( None, no_index=True, I=pattern, paths=[baseline_path, target_path], create_patch=True, )
The relevant behavior is:
- --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.
- -I/--ignore-matching-lines makes Git's result depend on whether the supplied regular expression matches the relevant file content.
- GitPython exposes the resulting bit through distinguishable behavior:
- matching condition: normal return with an empty DiffIndex
- non-matching condition: GitCommandError with exit status 1
An application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.
The issue was confirmed with the default allow_unsafe_options=False.
The behavior does not require the caller to explicitly opt into GitPython's unsafe-option mode.
Verified intended security boundary:
- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.
- GitPython 3.1.59 rejects that same path with UnsafeOptionError.
- GitPython 3.1.59 still permits the --no-index alternate path described above.
This appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.
PoC
A minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.
gitpython-3159-maintainer-evidence.zip
The minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:
correct prefix -> normal GitPython return incorrect prefix -> GitCommandError(status=1)
In the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.
Result: 3/3 recovered.
The extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.
Controls were also tested:
- normal repository-scoped diff: no secret disclosure
- same outside paths without --no-index: no arbitrary-filesystem interpretation
- deliberately incorrect predicate: status 1 as expected
Suggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.
Impact
Potential impact is disclosure of local files readable by the process running GitPython.
Exploitation requires an embedding application to allow an attacker to influence:
- the relevant diff options,
- both path operands, and
- repeated requests while exposing a distinguishable success/error result.
The demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.
Confirmed affected release: GitPython 3.1.59.
| URL | Type | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": null,
"range_state": "affected",
"resource": "gitpython",
"resource_purl": "pkg:pypi/gitpython@3.1.59",
"upstream_fixed_in": "3.1.60"
},
"package": {
"ecosystem": "Homebrew",
"name": "standardebooks",
"purl": "pkg:brew/standardebooks"
},
"ranges": [
{
"events": [
{
"introduced": "4.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/gitpython@3.1.59",
"name": "gitpython",
"resource": "gitpython",
"strategy": "registry",
"subject_version": "3.1.59"
}
]
},
"details": "### Summary\n\nGitPython 3.1.59 blocks a previously available local-file read path through unsafe git diff options such as -O/--orderfile.\n\nHowever, the high-level diff API still permits --no-index with the default allow_unsafe_options=False.\n\n--no-index changes the semantics of the paths arguments: instead of repository-relative pathspecs, Git interprets them as arbitrary filesystem paths.\n\nWhen combined with the still-allowed -I/--ignore-matching-lines option, this creates a content-dependent Boolean oracle over a caller-selected local file.\n\nThis was reproduced against the published GitPython 3.1.59 wheel.\n\nThe original unsafe-option path is blocked in 3.1.59, while this alternate path remains reachable without setting allow_unsafe_options=True.\n\n### Details\n\nConfirmed API surface:\n\nrepo.index.diff(\n None,\n no_index=True,\n I=pattern,\n paths=[baseline_path, target_path],\n create_patch=True,\n)\n\nThe relevant behavior is:\n\n1. --no-index makes the two values supplied via paths filesystem operands rather than repository pathspecs.\n2. -I/--ignore-matching-lines makes Git\u0027s result depend on whether the supplied regular expression matches the relevant file content.\n3. GitPython exposes the resulting bit through distinguishable behavior:\n - matching condition: normal return with an empty DiffIndex\n - non-matching condition: GitCommandError with exit status 1\n\nAn application that forwards attacker-influenced diff options and paths and exposes the success/error distinction can therefore be queried repeatedly to recover a guessable local single-line secret.\n\nThe issue was confirmed with the default allow_unsafe_options=False.\n\nThe behavior does not require the caller to explicitly opt into GitPython\u0027s unsafe-option mode.\n\nVerified intended security boundary:\n\n- GitPython 3.1.58 accepts the earlier -O/--orderfile local-file input path.\n- GitPython 3.1.59 rejects that same path with UnsafeOptionError.\n- GitPython 3.1.59 still permits the --no-index alternate path described above.\n\nThis appears to be an alternate route to the same local-file confidentiality property that the 3.1.59 diff option hardening is intended to protect.\n\n### PoC\n\nA minimal reproducer, controlled extraction demonstrator, proof matrix, and proposed remediation are included in the attached package.\n\n[gitpython-3159-maintainer-evidence.zip](https://github.com/user-attachments/files/31123571/gitpython-3159-maintainer-evidence.zip)\n\n\nThe minimal reproducer creates only temporary researcher-controlled files and demonstrates the following predicate:\n\ncorrect prefix -\u003e normal GitPython return\nincorrect prefix -\u003e GitCommandError(status=1)\n\nIn the controlled extraction test, I generated three independent random single-line values and recovered all three exactly through repeated calls to the GitPython high-level API.\n\nResult: 3/3 recovered.\n\nThe extraction harness also installs a Python audit hook that rejects direct Python open() access to the target file during the oracle phase. The content-dependent read is therefore performed by the child git process invoked through GitPython rather than by the reproduction script directly.\n\nControls were also tested:\n\n- normal repository-scoped diff: no secret disclosure\n- same outside paths without --no-index: no arbitrary-filesystem interpretation\n- deliberately incorrect predicate: status 1 as expected\n\nSuggested remediation is to classify --no-index as unsafe for the high-level diff API unless the caller explicitly sets allow_unsafe_options=True.\n\n### Impact\n\nPotential impact is disclosure of local files readable by the process running GitPython.\n\nExploitation requires an embedding application to allow an attacker to influence:\n\n1. the relevant diff options,\n2. both path operands, and\n3. repeated requests while exposing a distinguishable success/error result.\n\nThe demonstrated attack is a blind content oracle rather than a one-request in-band file read. It is particularly applicable to short or structured single-line secrets where the target path and approximate value format are known or guessable.\n\nConfirmed affected release: GitPython 3.1.59.",
"id": "BREW-standardebooks-CVE-2026-87818",
"modified": "2026-10-01T09:19:31Z",
"published": "2026-09-18T18:55:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/pull/2217"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/commit/09f2cf383a992d1af697364569e9f384748c1bd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/gitpython-developers/GitPython"
},
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.60"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3983.yaml"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"upstream": [
"PYSEC-2026-3983",
"CVE-2026-87818",
"GHSA-whh4-5q6c-9v3x"
]
}
CVE-2026-87818 (GCVE-0-2026-87818)
Vulnerability from cvelistv5 – Published: 2026-09-09 11:21 – Updated: 2026-09-09 14:06- CWE-88 - Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
| URL | Tags |
|---|---|
| https://github.com/gitpython-developers/GitPython… | vendor-advisory |
| https://www.vulncheck.com/advisories/gitpython-3.… | third-party-advisory |
| Vendor | Product | Version | |
|---|---|---|---|
| gitpython-developers | GitPython |
Affected:
3.1.59 , < 3.1.60
(semver)
Unaffected: 3.1.60 (semver) cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:* |
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-87818",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-09-09T14:06:42.660856Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-09-09T14:06:49.761Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"packageURL": "pkg:pypi/GitPython",
"product": "GitPython",
"vendor": "gitpython-developers",
"versions": [
{
"lessThan": "3.1.60",
"status": "affected",
"version": "3.1.59",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "3.1.60",
"versionType": "semver"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*",
"versionEndExcluding": "3.1.60",
"versionStartIncluding": "3.1.59",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "reporter",
"value": "kokomaru167"
}
],
"datePublic": "2026-08-26T00:00:00.000Z",
"descriptions": [
{
"lang": "en",
"value": "GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses."
}
],
"metrics": [
{
"cvssV4_0": {
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"attackVector": "NETWORK",
"baseScore": 7.1,
"baseSeverity": "HIGH",
"privilegesRequired": "LOW",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "NONE"
},
"format": "CVSS"
},
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 6.5,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"version": "3.1"
},
"format": "CVSS"
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-88",
"description": "Improper Neutralization of Argument Delimiters in a Command (\u0027Argument Injection\u0027)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-09-09T11:21:04.681Z",
"orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"shortName": "VulnCheck"
},
"references": [
{
"name": "GitHub Security Advisory (GHSA-whh4-5q6c-9v3x)",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"name": "VulnCheck Advisory: GitPython 3.1.59 Local File Content Oracle via --no-index",
"tags": [
"third-party-advisory"
],
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"title": "GitPython 3.1.59 Local File Content Oracle via --no-index",
"x_generator": {
"engine": "vulncheck-endgame"
}
}
},
"cveMetadata": {
"assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"assignerShortName": "VulnCheck",
"cveId": "CVE-2026-87818",
"datePublished": "2026-09-09T11:21:04.681Z",
"dateReserved": "2026-09-09T10:32:34.109Z",
"dateUpdated": "2026-09-09T14:06:49.761Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GHSA-RW58-WC66-99G4
Vulnerability from github – Published: 2026-09-09 12:32 – Updated: 2026-09-30 23:28Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-whh4-5q6c-9v3x. This link is maintained to preserve external references.
Original Description
GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 3.1.60"
},
"package": {
"ecosystem": "PyPI",
"name": "gitpython"
},
"ranges": [
{
"events": [
{
"introduced": "3.1.59"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-87818"
],
"database_specific": {
"cwe_ids": [
"CWE-88"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-30T23:28:15Z",
"nvd_published_at": "2026-09-09T12:17:16Z",
"severity": "HIGH"
},
"details": "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00a0GHSA-whh4-5q6c-9v3x. This link is maintained to preserve external references.\n\n## Original Description\nGitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.",
"id": "GHSA-rw58-wc66-99g4",
"modified": "2026-09-30T23:28:15Z",
"published": "2026-09-09T12:32:15Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-87818"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/gitpython-3.1.59-local-file-content-oracle-via-no-index"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: GitPython 3.1.59: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle",
"withdrawn": "2026-09-30T23:28:15Z"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.