CVE-2026-47734: Dulwich Dulwich Has Unbounded Memory Allocation Vulnerability

MODERATE
Advisory Identifier: GHSA-xrvj-v92f-53gj
CVSS 5.7
CWE-789 CWE-400
Published
Advisory Summary

CVE-2026-47734 is a MODERATE (CVSS 5.7) dulwich has unbounded memory allocation vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Dulwich libraries in the PyPI ecosystem. The issue involves dulwich has unbounded memory allocation in receive-pack from crafted thin packs. Remediation is available by upgrading affected packages to version 1.2.5.

CVE-2026-47734 at a Glance

CVE Identifier CVE-2026-47734
GHSA Identifier GHSA-xrvj-v92f-53gj
Severity MODERATE
CVSS v3.1 Base Score 5.7
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Dulwich
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-47734

To remediate this vulnerability, upgrade all affected Dulwich dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

dulwich fixed: 1.2.5
pip install dulwich>=1.2.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show dulwich

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-47734, inspect your installed packages using pip:

pip show dulwich

Analyze the terminal output to locate any version of Dulwich in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.5), your application is affected.

Note: The pip show dulwich command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Dulwich, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact An uncontrolled-resource-consumption (memory exhaustion) denial-of-service vulnerability (CWE-400 / CWE-789). A client with push access could push a tiny crafted thin pack (~174 bytes) whose delta header declares a huge dest_size. When dulwich ingested it via add_thin_pack / apply_delta, it would allocate hundreds of MB of memory based on that attacker-controlled size, with no relationship to the actual bytes received. Who is impacted: Operators running a Dulwich-based Git server that exposes git-receive-pack (i.e. accepts pushes) - for example via dulwich.server functionality, the HTTP smart server, or anything built on ReceivePackHandler. ## Patches Patched in 1.2.5. add_thin_pack now accepts a max_input_size keyword (bytes; 0/None = unlimited, matching git's semantics), and ReceivePackHandler reads receive.maxInputSize from the repository config and passes it through. Wire reads are counted and a PackInputTooLarge exception is raised once the cap is exceeded - equivalent to git index-pack --max-input-size. Users should upgrade to Dulwich 1.2.5 or later and set receive.maxInputSize in their server's repository config to a sane bound for their environment. ## Workarounds On unpatched versions, receive.maxInputSize has no effect, so it cannot be used as a workaround. Until upgrading, operators should: - Restrict dulwich-receive-pack (push) access to trusted, authenticated clients only, or disable it entirely on servers that only need to serve fetches. - Run the server under an OS-level memory limit (e.g. ulimit, cgroups/MemoryMax, or a container memory limit) so a malicious push is killed rather than taking down the host. ## Resources - git's receive.maxInputSize / git index-pack --max-input-size documentation - Reported by Liyi, Ziyue, Strick, Maurice and Chenchen @ University of Sydney

CVE-2026-47734 Affected Dulwich Versions

1 component(s)
Fixed Versions:
1.2.5
Product / Package Ecosystem Affected Versions Fixed Version
dulwich
PyPI
≥ 0.1.0
< 1.2.5
1.2.5

References

Frequently Asked Questions

What is CVE-2026-47734?
CVE-2026-47734 is a security vulnerability in Dulwich involving Dulwich has unbounded memory allocation in receive-pack from crafted thin packs under CWE-789: Memory Allocation with Excessive Size Value.
Which Dulwich versions are affected?
Affected versions include releases prior to 1.2.5 across affected packages: dulwich.
What version fixes CVE-2026-47734?
Upgrading to 1.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dulwich affected?
Yes, dulwich is affected in releases prior to 1.2.5. Upgrade your dependency to 1.2.5 or later.
What is the CVSS score of CVE-2026-47734?
CVE-2026-47734 has a CVSS v3.1 base score of 5.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-47734?
CVE-2026-47734 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check PyPI dependencies for CVE-2026-47734?
Run the dependency tree command: 'pip show dulwich'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xrvj-v92f-53gj",
  "modified" : "2026-06-11T14:07:18Z",
  "published" : "2026-06-08T23:43:42Z",
  "aliases" : [ "CVE-2026-47734" ],
  "summary" : "Dulwich has unbounded memory allocation in receive-pack from crafted thin packs",
  "details" : "## Impact\n\nAn uncontrolled-resource-consumption (memory exhaustion) denial-of-service vulnerability (CWE-400 / CWE-789).\n\nA client with push access could push a tiny crafted thin pack (~174 bytes)  whose delta header declares a huge   dest_size. When dulwich ingested it via  add_thin_pack / apply_delta, it would  allocate hundreds of MB of memory based on that attacker-controlled size, with no relationship to the actual bytes received.\n\nWho is impacted: Operators running a Dulwich-based Git server that exposes git-receive-pack (i.e. accepts pushes) -\nfor example via dulwich.server functionality, the HTTP  smart server, or anything built on ReceivePackHandler. \n\n## Patches\n\nPatched in 1.2.5.\n\nadd_thin_pack now accepts a max_input_size keyword (bytes; 0/None = unlimited, matching git's semantics), and ReceivePackHandler reads receive.maxInputSize from the repository config and passes it through. Wire reads are counted and a PackInputTooLarge exception is raised once the cap is exceeded - equivalent to git index-pack --max-input-size.\n\nUsers should upgrade to Dulwich 1.2.5 or later and set receive.maxInputSize in their server's repository config to a sane bound for their environment.\n\n## Workarounds\n\nOn unpatched versions, receive.maxInputSize has no effect, so it cannot be used as a workaround. Until upgrading, operators should:\n\n- Restrict dulwich-receive-pack (push) access to trusted, authenticated clients only, or disable it entirely on servers that only need to serve fetches.\n- Run the server under an OS-level memory limit (e.g. ulimit, cgroups/MemoryMax, or a container memory limit) so a malicious push is killed rather than taking down the host.\n\n##  Resources\n\n- git's receive.maxInputSize / git index-pack --max-input-size documentation \n- Reported by Liyi, Ziyue, Strick, Maurice and Chenchen @ University of Sydney",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "dulwich"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.0"
      }, {
        "fixed" : "1.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jelmer/dulwich/security/advisories/GHSA-xrvj-v92f-53gj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47734"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jelmer/dulwich"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-789" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-08T23:43:42Z",
    "nvd_published_at" : "2026-06-10T23:16:48Z"
  }
}