dulwich is vulnerable to Path Traversal
86
High Risk
build_index_from_tree in dulwich/index.py materializes checkout and index entries without verifying that the leading path components of each entry resolve inside the work tree. A crafted tree that contains a symlink entry (for example link pointing to an absolute or out-of-tree target) followed by an entry beneath it (link/foo) causes files to be written through the symlink to an arbitrary filesystem location. Checking out or cloning a malicious repository can therefore overwrite sensitive files such as .git/hooks, which leads to remote code execution on a later git operation. The fix applies the verify_leading_dirs guard so entries whose leading path resolves through a symlink are refused.
You are affected if you are using a version that falls within the vulnerable range and you check out or clone an untrusted repository.
dulwich is vulnerable to Path Traversal in versions 0.8.4 - 1.2.11.
Upgrade the dulwich library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant