{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2026-47712","published":"2026-06-10T23:16:48.650000Z","last_modified":"2026-07-21T19:10:00.107000Z","status":"Deferred","cvss":{"version":"3.1","score":3.3,"severity":"LOW","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","source":"security-advisories@github.com","primary":false},"auth":true,"cwes":["CWE-22"],"cpes":[],"cpes_truncated":false,"vendors":["jelmer"],"products":["jelmer/dulwich"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-555p-6grf-mh7f","ecosystem":"PyPI","name":"dulwich","purl":"pkg:pypi/dulwich","ranges":[{"introduced":"0.24.0","fixed":"1.2.5"}],"versions":["0.24.0","0.24.1","0.24.10","0.24.2","0.24.3","0.24.4","0.24.5","0.24.6","0.24.7","0.24.8","0.24.9","0.25.0","0.25.1","0.25.2","1.0.0","1.1.0","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4"],"versions_truncated":false},{"advisory":"PYSEC-2026-2462","ecosystem":"PyPI","name":"dulwich","purl":"pkg:pypi/dulwich","ranges":[{"introduced":"0.24.0","fixed":"1.2.5"}],"versions":["0.24.0","0.24.1","0.24.10","0.24.2","0.24.3","0.24.4","0.24.5","0.24.6","0.24.7","0.24.8","0.24.9","0.25.0","0.25.1","0.25.2","1.0.0","1.1.0","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4"],"versions_truncated":false}],"severity":"low","priority_score":20,"links":{"html_es":"/es/cve/CVE-2026-47712/","html_en":"/en/cve/CVE-2026-47712/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-47712","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-47712"},"untrusted":{"vendor_name":"jelmer","product_name":"dulwich","desc_en":"Dulwich is a pure-Python implementation of the Git file formats and protocols. Starting in version 0.24.0 and prior to version 1.2.5, dulwich.porcelain.format_patch(outdir=...) derives each patch filename from the commit's subject line. Prior to this fix, get_summary only replaced spaces with dashes - path separators (/, \\), parent-directory components (..), and other filename-hostile characters (e.g. :) were preserved verbatim and passed straight into os.path.join(outdir, f\"{i:04d}-{summary}.patch\"). A malicious commit subject could therefore direct the generated patch file outside the requested outdir. This is fixed in Dulwich 1.2.5. Users should upgrade to 1.2.5 or later. dulwich.patch.get_summary now mirrors git's format_sanitized_subject: only `[A-Za-z0-9._]` are kept, runs of other characters collapse to a single -, consecutive . collapse to a single ., trailing ./- are stripped, and the result is length-limited. This makes the returned string safe to embed as a filename component, so format_patch can no longer be steered out of outdir via the commit subject. Until upgrading, callers that pass untrusted commits to   porcelain.format_patch can use stdout=True and write the patch to a destination they control, rather than letting format_patch choose the filename; validate the chosen path before opening - e.g. compare os.path.realpath(returned_path) against  os.path.realpath(outdir) and reject any patch whose resolved path is not inside outdir; and/or pre-screen commits and refuse to format any whose subject's first line contains /, \\, .., or other characters that are not safe on the target filesystem.","affected":[{"untrusted_vendor":"jelmer","untrusted_product":"dulwich","versions":[]}],"references":[{"url":"https://github.com/jelmer/dulwich/commit/c2446e51b","tags":[]},{"url":"https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5","tags":[]},{"url":"https://github.com/jelmer/dulwich/security/advisories/GHSA-555p-6grf-mh7f","tags":[]}]},"bulletins":[{"source":"suse","id":"openSUSE-SU-2026:10900-1","url":"https://www.suse.com/support/update/","published":"2026-05-29T00:00:00+00:00","severity":"high","exploited":false,"untrusted":{"title":"python311-dulwich-1.2.5-1.1 on GA media"}}]}