Impact
Dulwich, a pure‑Python Git implementation, concatenated the commit subject line into the output filename without removing or escaping path traversal characters. An attacker who can supply an untrusted commit to porcelain.format_patch could craft a subject that writes the generated patch outside the requested output directory, overwriting or creating arbitrary files and potentially exposing or tampering with system data.
Affected Systems
The vulnerability affects Dulwich versions released from 0.24.0 up to, but not including, 1.2.5. All users of the jelmer:dulwich library running these versions are impacted until the library is updated to 1.2.5 or newer.
Risk and Exploitability
The issue holds a CVSS score of 3.3, indicating low severity, and is not listed in the CISA KEV catalog. The exploit requires local control over the input to porcelain.format_patch; no network or remote attacker condition is stated, so the attack vector is likely local or within an application that processes untrusted commits. Because the path traversal is performed during filename construction, an attacker could write files to arbitrary locations under the effective user permissions of the process executing the library.
OpenCVE Enrichment
Github GHSA