Intel

AIKIDO-2026-273570

dulwich is vulnerable to Path Traversal

GHSA-5fqc-mrg8-w798Published Jul 7, 2026
July 7, 2026

86

CVE Score

High

Path Traversal

Are you affected? Scan for Free

TL;DR

Dulwich's filter_branch.CommitFilter._apply_index_filter() builds a temporary index by materializing tree entries into the current working directory and its cleanup only removes the temporary index file, leaving materialized files including symlinks in place between commits. Because parent commits are processed recursively first, a symlink materialized from an ancestor commit can redirect a descendant commit's writes to arbitrary filesystem locations. A crafted repository processed with filter-branch --index-filter can therefore write attacker-controlled content outside the work tree, for example into .git/hooks, leading to remote code execution. The fix builds the temporary index in memory instead of materializing tree entries into the working directory.

How do I fix this?

Upgrade the dulwich library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and run filter-branch with an index filter on repositories from an untrusted source.

Package

Versions

0.23.1 - 1.2.7

Fixed in 1.2.8

Background info

dulwich is vulnerable to Path Traversal in versions 0.23.1 - 1.2.7.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea