{"cve":{"cve_id":"CVE-2026-47712","is_kev":false,"kev_date_added":null,"kev_vendor_project":null,"kev_product":null,"kev_vulnerability_name":null,"kev_short_description":null,"kev_required_action":null,"kev_due_date":null,"kev_known_ransomware":null,"kev_notes":null,"kev_cwes":null,"epss_score":0.00139,"epss_percentile":0.03553,"epss_as_of":"2026-06-23","description":"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.","published_at":"2026-06-10T22:01:49.996000Z","last_modified_at":null,"cvss_v3_score":3.3,"cvss_v3_vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","cvss_v3_severity":"LOW","cvss_v4_score":null,"cvss_v4_vector":null,"cvss_v4_severity":null,"ssvc_decision":null,"ssvc_exploitation":null,"ssvc_automatable":null,"ssvc_technical_impact":null,"cwes":["CWE-22"],"nvd_references":["https://github.com/jelmer/dulwich/security/advisories/GHSA-555p-6grf-mh7f","https://github.com/jelmer/dulwich/commit/c2446e51b","https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5"],"vuln_status":null,"trending_score":null,"is_trending":false,"has_trended":false,"trended_number_one":false,"trending_peak_score":null,"trending_peak_rank":null,"started_trending_at":null,"trended_number_one_at":null,"summary_generated":null,"summary_generated_at":null,"summary_model":null,"created_at":"2026-06-24T00:09:39.878444Z","updated_at":"2026-06-28T23:30:41.527238Z"},"effective_severity":"LOW","badges":[],"impact_analysis":[],"cvss_v3_decoded":{"version":"3.1","metrics":[{"metric":"AV","name":"Attack Vector","value":"L","value_label":"Local"},{"metric":"AC","name":"Attack Complexity","value":"L","value_label":"Low"},{"metric":"PR","name":"Privileges Required","value":"N","value_label":"None"},{"metric":"UI","name":"User Interaction","value":"R","value_label":"Required"},{"metric":"S","name":"Scope","value":"U","value_label":"Unchanged"},{"metric":"C","name":"Confidentiality","value":"N","value_label":"None"},{"metric":"I","name":"Integrity","value":"L","value_label":"Low"},{"metric":"A","name":"Availability","value":"N","value_label":"None"}]},"cvss_v4_decoded":{"version":null,"metrics":[]},"affected":[{"vendor_slug":"jelmer","vendor_name":"jelmer","product_slug":"dulwich","product_name":"dulwich","version_start":">= 0.24.0, < 1.2.5","version_start_inclusive":true,"version_end":">= 0.24.0, < 1.2.5","version_end_inclusive":true,"cpe23_uri":"cve5:jelmer:dulwich:>= 0.24.0, < 1.2.5:>= 0.24.0, < 1.2.5"}],"exploit_refs":[],"news":[],"references":[{"url":"https://github.com/jelmer/dulwich/security/advisories/GHSA-555p-6grf-mh7f","source_type":"VENDOR_ADVISORY","tags":["advisory"]},{"url":"https://github.com/jelmer/dulwich/commit/c2446e51b","source_type":"PATCH","tags":["patch"]},{"url":"https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5","source_type":"PATCH","tags":["patch"]}],"timeline":[{"type":"published","at":"2026-06-10T22:01:49.996000Z","label":"CVE published","source":null},{"type":"cvss_changed","at":"2026-06-28T17:54:57.553414Z","label":"CVSS score revised","source":"cvelistv5"},{"type":"cvss_changed","at":"2026-06-28T17:54:57.553414Z","label":"CVSS score revised","source":"cvelistv5"},{"type":"cvss_changed","at":"2026-06-28T17:54:57.553414Z","label":"CVSS score revised","source":"cvelistv5"}]}