Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.
Open advisories
13 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.
Affected files dulwich/index.py (Methods: validatepathelementntfs, treetofspath) dulwich/porcelain/init.py (Method: checkedworktreepath) Description / Summary A High-severity Path Traversal vulnerability exists in Dulwich's checkout logic when running on Windows. The functions responsible for validating NTFS paths strictly reject .git variants, Alternate Data Streams (ADS), git~1 short names, and reserved device names, but they completely fail to check for DOS drive letter prefixes. A malicious Git tree can contain an entry named C:. When Dulwich processes this tree on a Windows client, the string passes the validatepathelementntfs check. Later, treetofspath passes this path to os.path.join(root, b"C:\\\\Users\\\\..."). On Windows, if the second argument to os.path.join contains an absolute drive letter, the root path is completely discarded. As a result, Dulwich writes the repository file to the absolute path outside of the intended Git worktree. While the standard C git client…
Recommended action: Upgrade to 1.2.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Affected file dulwich/pack.py (Method: Pack.resolveobject) Description / Summary A High-severity Denial of Service (DoS) vulnerability exists in the Pack.resolveobject method. When resolving an OFSDELTA object, the resolver calculates the base offset using baseoffset = objoffset - deltaoffset. If a malicious packfile contains an OFSDELTA object where deltaoffset is 0, the calculation objoffset - 0 resolves back to the current object's own offset. Because the implementation lacks a depth counter, a "visited" set, or an explicit rejection of deltaoffset == 0, the resolver enters an infinite recursive loop, exhausting CPU resources and eventually crashing the process. Vulnerable Code Breakdown (dulwich/pack.py): Potential impact An attacker can trigger this infinite loop via any operation that walks packfiles (e.g., dulwich clone, fetch, cat-file, or internal Pack.getitem lookups). 1. CPU Exhaustion: The process will spin at 100% CPU indefinitely. 2. Denial of Service: Any service using…
Recommended action: Upgrade to 1.2.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Dulwich's porcelain.checkout(paths=[...]) code path writes files using raw os.open(filepath, OWRONLY|OCREAT|OTRUNC, mode) followed by f.write(obj.data). This code path does NOT call buildfilefromblob() at all, completely bypassing any symlink protections (including the unreleased d09f8af fix). os.open without ONOFOLLOW follows symlinks at both the target file and intermediate directories, allowing arbitrary file writes. Root Cause At dulwich/porcelain/init.py:5661-5675, the checkout(paths=[...]) implementation: checkedworktreepath() (line 601-631) only performs name validation — checking that the path doesn't start with / or \\ and that components pass INVALIDDOTNAMES checks. It performs zero filesystem symlink detection. Impact An attacker can craft a malicious repository that, when a victim clones it and runs checkout(paths=[...]), writes attacker-controlled content (with attacker-controlled permissions) to any filesystem location accessible to the user. Writing to…
Recommended action: Upgrade to 1.2.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Dulwich's filterbranch.py CommitFilter.applyindexfilter() is vulnerable to symlink directory traversal. When processing commit history, materialized tree entries (including symlinks) persist in the working directory between commits, allowing a symlink from an ancestor commit to redirect file writes from a descendant commit to arbitrary filesystem locations. Root Cause applyindexfilter() at dulwich/filterbranch.py:212 calls buildindexfromtree(".", tmpindexpath, ...) which materializes all tree entries to the current working directory. The finally block (line 229-230) only cleans up the temporary index file (os.unlink(tmpindexpath)) — NOT the filesystem files written to CWD. When processcommit() processes parents recursively first (line 260), files materialized from ancestor commits persist and affect processing of descendant commits. On dulwich 1.2.7, buildfilefromblob() has no symlink protection, and validatepathelement only validates name patterns, not filesystem state.…
Recommended action: Upgrade to 1.2.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Dulwich's stash.py:pop() function is vulnerable to symlink directory traversal, allowing an attacker to write arbitrary files outside the repository worktree when a victim pops a stash in a malicious repository. Root Cause The pop() function at dulwich/stash.py:236 uses os.path.exists(parentdir) to check if a parent directory exists before writing stashed files. os.path.exists() follows symlinks, so when an intermediate directory in the path is a symlink pointing outside the worktree (e.g., link → ../../.git/hooks), the check passes and subsequent file writes resolve through the symlink. The validatepath() function (line 228) only validates path component names against INVALIDDOTNAMES — it performs zero filesystem symlink detection. On dulwich 1.2.7 (latest release), buildfilefromblob() has no symlink protection whatsoever. Impact An attacker can craft a malicious repository that, when a victim clones it and performs a stash pop operation, writes attacker-controlled content…
Recommended action: Upgrade to 1.2.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
dulwich.porcelain.submoduleupdate, and by extension porcelain.clone(..., recursesubmodules=True), materializes attacker-controlled submodule paths from a crafted upstream repository without path validation. A malicious .gitmodules plus a matching tree gitlink whose path is .git/hooks (or any other directory inside the parent repository's .git directory) causes the attacker's submodule tree contents to be written directly into the victim's .git/hooks/ directory, preserving executable mode bits. The dropped executables are then run by any subsequent git or dulwich command that invokes the matching hook, resulting in arbitrary code execution. This is the dulwich equivalent of the upstream Git fixes for CVE-2024-32002 / CVE-2024-32004, which were never propagated into dulwich's separately implemented submodule porcelain. Affected - Package: dulwich (PyPI) - Affected versions: =0.23.2, <1.2.5 - Affected platforms: all (Linux, macOS, Windows). Exploitation does not require a…
Recommended action: Upgrade to 1.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Impact An uncontrolled-resource-consumption (memory exhaustion) denial-of-service vulnerability (CWE-400 / CWE-789). A client with push access could push a tiny crafted thin pack (~174 bytes) whose delta header declares a huge destsize. When dulwich ingested it via addthinpack / applydelta, it would allocate hundreds of MB of memory based on that attacker-controlled size, with no relationship to the actual bytes received. Who is impacted: Operators running a Dulwich-based Git server that exposes git-receive-pack (i.e. accepts pushes) - for example via dulwich.server functionality, the HTTP smart server, or anything built on ReceivePackHandler. Patches Patched in 1.2.5. addthinpack now accepts a maxinputsize keyword (bytes; 0/None = unlimited, matching git's semantics), and ReceivePackHandler reads receive.maxInputSize from the repository config and passes it through. Wire reads are counted and a PackInputTooLarge exception is raised once the cap is exceeded - equivalent to git…
Recommended action: Upgrade to 1.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Impact dulwich.porcelain.formatpatch(outdir=...) derives each patch filename from the commit's subject line. Prior to this fix, getsummary only replaced spaces with dashes - path separators (/, \), parent-directory components (..), and other filename-hostile characters (e.g. :) were preserved verbatim and passed straight into os.path.join(outdir, f"{i:04d}-{summary}.patch"). A malicious commit subject could therefore direct the generated patch file outside the requested outdir. Reduced examples: - x/../../x produced <outdir/0001-x/../../x.patch, resolving two directories above outdir. - x\..\..\x produced the equivalent escape on Windows, here \ is also a path separator. Related issues from the same root cause: - Subjects containing characters that are illegal in Windows filenames (e.g. :) caused formatpatch to fail outright on Windows, where git would have succeeded. - Very long subjects produced excessively long filenames that could exceed filesystem limits; git truncates them.…
Recommended action: Upgrade to 1.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Dulwich's ProcessMergeDriver substitutes the file path (from the git tree, controllable by an attacker via a malicious branch) into the merge driver command via the %P placeholder and executes it with subprocess.run(..., shell=True). An attacker who can cause a victim to merge an untrusted branch can achieve arbitrary command execution by crafting malicious file paths. Description - Type: Command Injection - Source: merge.py line 195 — path from merge tree (from repository content when merging untrusted branch) - Sink: mergedrivers.py lines 124–127 — subprocess.run(cmd, shell=True) where cmd includes path via %P placeholder - Impact: Arbitrary code execution when merging from a malicious repository. Requires the user to have a merge driver configured that uses the %P placeholder. Resources - Repository: https://github.com/dulwich/dulwich - Vulnerable file: dulwich/mergedrivers.py (lines 119–129) Proof of Concept Fix mergedriversshellescape.patch
Recommended action: Upgrade to 1.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Impact Arbitrary file write leading to remote code execution when cloning or checking out a malicious Git repository on Windows. Dulwich's path-element validator accepted tree entries whose filenames contained bytes that Windows interprets as structural path syntax: - \ — the Windows path separator. A single tree entry named .git\hooks\pre-commit.exe was treated as one valid filename on POSIX but materialized as nested directories .git/hooks/pre-commit.exe on Windows, planting a file inside the victim's .git directory. Git for Windows then executes that hook on the next git commit, giving the attacker arbitrary code execution in the victim's user context. The same primitive can be used with ..\outside.txt to escape the work tree. - : — the NTFS alternate-data-stream marker. .git::$INDEXALLOCATION writes directly into the victim's .git entity, bypassing the .git-as-a-directory check. - git~<digits — NTFS 8.3 short-name aliases of .git. Only the literal git~1 was rejected; git~2,…
Recommended action: Upgrade to 1.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Buffer overflow in the C implementation of the applydelta function in pack.c in Dulwich before 0.9.9 allows remote attackers to execute arbitrary code via a crafted pack file.
Recommended action: Upgrade to 0.9.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
The buildindexfromtree function in index.py in Dulwich versions 0.9.9 and below allows remote attackers to execute arbitrary code via a commit with a directory path starting with .git/, which is not properly handled when checking out a working tree.
Recommended action: Upgrade to 0.9.10 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Dulwich before 0.18.5, when an SSH subprocess is used, allows remote attackers to execute arbitrary commands via an ssh URL with an initial dash character in the hostname, a related issue to CVE-2017-9800, CVE-2017-12836, CVE-2017-12976, CVE-2017-1000116, and CVE-2017-1000117.
Recommended action: Upgrade to 0.18.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.