Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-114096 Overview
CVE-2026-114096 is a symlink following vulnerability in Dulwich, a pure-Python implementation of the Git file formats and protocols. The flaw affects versions from 0.24.0 before 1.2.8 and resides in the porcelain.checkout(paths=[...]) function. The function uses raw os.open without the O_NOFOLLOW flag, allowing an attacker-controlled worktree symlink to redirect writes outside the intended path. A malicious repository can point a symlink to .git/hooks/post-checkout, so restoring a file from a tag writes a hook that executes attacker-controlled code. The weakness is classified as [CWE-59] Link Following.
Critical Impact
A crafted Dulwich repository can achieve local code execution on a victim host when the user runs a path-scoped checkout against an attacker-supplied tag or branch.
Affected Products
- Dulwich versions 0.24.0 through 1.2.7
- Python applications and tooling that call dulwich.porcelain.checkout with a paths argument
- Git hosting and automation workflows that process untrusted repositories using Dulwich
Discovery Timeline
- 2026-10-21 - CVE CVE-2026-114096 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-114096
Vulnerability Analysis
The vulnerability lives in Dulwich's porcelain layer, which exposes high-level Git operations similar to the native git command. When porcelain.checkout is invoked with an explicit paths list, Dulwich restores each named path from the target tree into the working directory. The restore operation opens the destination file using os.open without passing the O_NOFOLLOW flag. The operating system therefore follows any existing symlink at that path and writes the restored content to the symlink target instead of replacing the symlink itself. This primitive lets a crafted repository write arbitrary file contents anywhere the Dulwich process has write access.
Root Cause
The root cause is unsafe file creation semantics in the checkout path handler. Dulwich treats the destination inode as if it were a regular file and does not refuse to traverse symlinks. Secure Git implementations defend against this class of issue by using O_NOFOLLOW, by rejecting worktree entries whose parent directories contain symlinks, or by resolving and validating the final path before writing. Dulwich performed none of these checks on the affected code path, matching the pattern described by [CWE-59].
Attack Vector
Exploitation requires local user interaction with an attacker-supplied repository. The attacker constructs a repository containing a worktree symlink at a benign-looking filename pointing to .git/hooks/post-checkout. The attacker also creates a tag or branch in which that same path is a regular file containing an executable hook script. When a victim runs a path-scoped porcelain.checkout referencing the attacker's ref, Dulwich writes the regular file content through the symlink into the hooks directory. Subsequent checkout operations invoke the newly written post-checkout hook, giving the attacker code execution as the victim user.
No verified public exploit code is available at the time of publication. See the GitHub Security Advisory GHSA-8w8g-wq8h-fq33 and the VulnCheck Advisory on Dulwich for additional technical context.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-114096
Indicators of Compromise
- Unexpected files inside the .git/hooks/ directory of repositories processed by Dulwich-based tooling, especially post-checkout, post-merge, or pre-commit.
- Worktree entries that are symbolic links pointing into .git/ or to absolute paths outside the repository root.
- Process execution originating from .git/hooks/* immediately following a Dulwich checkout operation.
Detection Strategies
- Inventory Python environments for installed dulwich versions between 0.24.0 and 1.2.7 using pip list or software bill of materials data.
- Scan untrusted repositories prior to checkout for symlinks whose targets resolve inside .git/ or outside the worktree.
- Correlate Dulwich checkout events with subsequent shell or interpreter execution launched from hook paths.
Monitoring Recommendations
- Enable file integrity monitoring on .git/hooks/ directories in build agents, CI runners, and developer workstations that use Dulwich.
- Log and alert on writes to Git hook paths from Python processes that are not the system git binary.
- Capture process ancestry for any script executed from a .git/hooks/ location to support incident response.
How to Mitigate CVE-2026-114096
Immediate Actions Required
- Upgrade Dulwich to version 1.2.8 or later across all Python environments, container images, and CI pipelines.
- Audit automation that calls dulwich.porcelain.checkout with a paths argument against untrusted repositories.
- Treat any repository fetched from an untrusted source as hostile until the Dulwich dependency is patched.
Patch Information
The Dulwich maintainers addressed the issue in version 1.2.8. The fix prevents the checkout path from following symbolic links when writing restored files. Review the GitHub Security Advisory GHSA-8w8g-wq8h-fq33 for the authoritative patch reference and affected version range.
Workarounds
- Avoid invoking porcelain.checkout with the paths parameter on repositories from untrusted sources until the upgrade is applied.
- Execute Dulwich operations inside an unprivileged, sandboxed account or container that cannot write to sensitive host locations.
- Pre-validate repositories by rejecting any tree entries whose paths resolve through symlinks before passing them to Dulwich.
# Upgrade Dulwich to the patched release
pip install --upgrade "dulwich>=1.2.8"
# Verify the installed version
python -c "import dulwich; print(dulwich.__version__)"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

