Skip to content

← Actionable
High, CVSS 7.5amended

Dulwich's submodule path traversal in porcelain.submodule_update / porcelain.clone(recurse_submodules=True) yields RCE via attacker-dropped .git/hooks payload

CVE-2026-52726GHSA-gfhv-vqv2-4544

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (dulwich 1.2.5), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI dulwich

    Affected
    >= 0.23.2, < 1.2.5
    Fixed in
    1.2.5

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
  • CVE-2026-52726: 0.45% estimated exploitation activity in the next 30 days; percentile 39.03 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary dulwich.porcelain.submoduleupdate, and by extension porcelain.clone(..., recursesubmodules=True), materializes attacker-controlled submodule paths from a crafted upstream repository without path validation. A malicious .gitmodules plus a matching tree gitlink whose path is .git/hooks (or any other directory inside the parent repository's .git directory) causes the attacker's submodule tree contents to be written directly into the victim's .git/hooks/ directory, preserving executable mode bits. The dropped executables are then run by any subsequent git or dulwich command that invokes the matching hook, resulting in arbitrary code execution. This is the dulwich equivalent of the upstream Git fixes for CVE-2024-32002 / CVE-2024-32004, which were never propagated into dulwich's separately implemented submodule porcelain. Affected - Package: dulwich (PyPI) - Affected versions: =0.23.2, <1.2.5 - Affected platforms: all (Linux, macOS, Windows). Exploitation does not require a…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-gfhv-vqv2-4544

  2. Revision 1 · created ·

    Published from osv record GHSA-gfhv-vqv2-4544

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-52726

Advisory: Dulwich's submodule path traversal in porcelain.submodule_update / porcelain.clone(recurse_submodules=True) yields RCE via attacker-dropped .git/hooks payload
IDs: CVE-2026-52726, GHSA-gfhv-vqv2-4544
Record: https://patchnext.com/advisories/cve-2026-52726 (revision 2, source checked 26 Oct 2026, 13:46 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: dulwich 1.2.5. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI dulwich: affected >= 0.23.2, < 1.2.5; fixed in 1.2.5

## Suggested inspection (read-only)
- `python -m pip show dulwich`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on dulwich.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-gfhv-vqv2-4544 (OSV record GHSA-gfhv-vqv2-4544 lists affected ranges: PyPI dulwich >=0.23.2 <1.2.5 (fixed))
- Verified: https://github.com/advisories/GHSA-gfhv-vqv2-4544 (GitHub-reviewed advisory GHSA-gfhv-vqv2-4544 lists affected ranges: PyPI dulwich >=0.23.2 <1.2.5)

Commands are suggestions: review each one before running it.

Loading voting…