---
id: "CVE-2026-114098"
kind: "vulnerability"
aliases: ["CVE-2026-114098"]
title: "Dulwich: stash pop path traversal writes files and runs code on checkout"
severity: "high"
cvss: 7.8
epss: 0.00152
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ci", "dulwich", "git-automation", "package", "python"]
not_affected_if: ["no-stash-pop-usage", "trusted-repos-only"]
published_at: "2026-10-21T01:17:35+00:00"
first_seen_at: "2026-10-23T21:57:28+00:00"
updated_at: "2026-10-25T03:08:25+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114098", "first_seen_at": "2026-10-23T21:57:28+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114098", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# Dulwich: stash pop path traversal writes files and runs code on checkout

Dulwich, a pure-Python Git library, fails to block writes outside the worktree during stash pop when intermediate directories are symlinks. A malicious repository can plant a payload in .git/hooks/post-checkout, which runs code on the next checkout.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `pip show dulwich` (or `pip index versions dulwich`) and confirm the installed version is below `1.2.8`
- Search dependency lockfiles for `dulwich` pinned to a version from `0.22.5` up to `1.2.8`

## Fix

- Upgrade Dulwich to `1.2.8` or later
- Until upgraded, avoid calling stash pop on untrusted repositories

## Timeline

- 2026-10-23T21:57:28+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114098
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114098

## From the sources

Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
