CVE-2026-114096 in Dulwichinfo

Summary

by MITRE • 10/22/2026

Dulwich from 0.24.0 before 1.2.8 contains a symlink following vulnerability in porcelain.checkout(paths=[...]) that allows attackers to write arbitrary files by abusing raw os.open without O_NOFOLLOW. Attackers can craft a repository where a worktree symlink points to .git/hooks/post-checkout, so restoring the file from a tag writes a malicious hook for code execution.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 10/22/2026

The vulnerability identified in Dulwich versions prior to 1.2.8 represents a critical security flaw rooted in improper handling of symbolic links during repository checkout operations. Specifically, the porcelain.checkout function fails to enforce strict symlink validation when resolving file paths within the working tree. This deficiency allows an attacker who controls or influences the contents of a Git repository to manipulate the filesystem state through carefully crafted symlinks. The core technical issue lies in the use of raw os.open calls that do not include the O_NOFOLLOW flag, which is essential for preventing symbolic link following attacks. Without this protection, the operating system resolves the symlink target rather than treating it as a regular file entry, leading to unintended write operations outside the intended directory structure or into sensitive locations within the repository itself.

This flaw enables an attacker to construct a malicious repository where specific files are replaced with symlinks pointing to critical internal paths such as .git/hooks/post-checkout. When a user performs a checkout operation from this compromised repository, particularly when restoring files associated with tags or branches, Dulwich follows these symlinks and writes data directly into the targeted location. In the described scenario, writing to the post-checkout hook file allows for arbitrary code execution because Git automatically executes hooks located in the .git/hooks directory upon certain actions like checkout completion. Consequently, any user who checks out this malicious repository will inadvertently execute attacker-controlled scripts with their own privileges and access rights.

The operational impact of this vulnerability is severe as it facilitates remote code execution through social engineering or supply chain attacks. Users interacting with untrusted repositories are at risk without realizing the danger until after they have pulled or checked out content. This aligns closely with CWE-59 Improper Link Resolution Before File Access, also known as a symlink following attack. The exploitation vector leverages standard Git workflows to bypass security boundaries that rely on directory isolation. By abusing the trust model inherent in version control systems where users assume repository contents are safe to process, attackers can achieve persistent access or initial foothold within an environment by injecting malicious hooks into automated execution pipelines.

From a threat intelligence perspective, this vulnerability maps to MITRE ATT&CK techniques involving command and script interpretation via system-level hooks. The attack does not require complex exploitation chains but relies on the victim's routine interaction with version control tools. Mitigation strategies must prioritize updating Dulwich to version 1.2.8 or later where these symlink checks have been hardened. For environments unable to upgrade immediately, administrators should enforce strict policies regarding repository sources and consider implementing pre-commit hooks that validate file integrity before allowing checkout operations. Additionally, disabling automatic hook execution in shared repositories can serve as a temporary defensive measure while patching is applied across the infrastructure.

Responsible

VulnCheck

Reservation

10/20/2026

Disclosure

10/22/2026

Moderation

accepted

EPSS

0.00155

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!