> CVE-2026-47712 [LOW]

« BACK_TO_HOME
PUBLISHED
2026-06-10 23:16
MODIFIED
2026-06-10 23:16
CVSS_SCORE V3
3.3
EPSS (Prob. Exploit)
0.18%
Top 93.1%
DATA SOURCES:
NVD 🔗 2026-06-11 RED HAT 🔗 2026-06-14 CWE MITRE 🔗 2026-11-01 FIRST EPSS 🔗 2026-10-25 GITHUB 🔗 2026-11-05 OSV 🔗 2026-09-20

> 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.

> AFFECTED_PRODUCTS

ℹ️ Aucun produit affecté n'a encore été publié par NVD pour cette CVE.

> CVSS V3 METRICS

CVSS_VECTOR
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
EXPLOITABILITY
1.8
IMPACT
1.4

> MÉTRIQUES CVSS DÉTAILLÉES

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Métrique Valeur Interprétation
AV (Vecteur d'Attaque)
Attack Vector
Local (L)
Exploit nécessite un accès local au système
AC (Complexité d'Attaque)
Attack Complexity
Low (L)
Peu de conditions requises pour exploiter
PR (Privilèges Requis)
Privileges Required
None (N)
Aucune authentification requise
UI (Interaction Utilisateur)
User Interaction
Required (R)
Nécessite une action utilisateur (clic lien, ouverture fichier, etc.)
S (Périmètre)
Scope
Unchanged (U)
Impact reste dans le périmètre du composant compromis
C (Impact Confidentialité)
Confidentiality Impact
None (N)
Aucune divulgation d'informations
I (Impact Intégrité)
Integrity Impact
Low (L)
Modification limitée des données possible
A (Impact Disponibilité)
Availability Impact
None (N)
Aucune interruption de service

> RÉSUMÉ DES IMPACTS

Confidentialité
None
Aucune divulgation d'informations
Intégrité
Low
Modification limitée des données possible
Disponibilité
None
Aucune interruption de service

> WEAKNESSES

CWE-22

> CWE DETAILED DESCRIPTIONS

CWE-22: Improper Limitation of a Pathname to a Restricted Directory - The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

> RED HAT SEVERITY ASSESSMENT

THREAT SEVERITY
Low

> GITHUB SECURITY ADVISORY

GHSA-555p-6grf-mh7f LOW

Dulwich doesn't sanitize commit subjects in `porcelain.format_patch`

AFFECTED PACKAGES:
PIP / dulwich
>= 0.24.0, < 1.2.5
Fixed in: 1.2.5

> OSV (GOOGLE OPEN SOURCE VULNERABILITIES)

Dulwich doesn't sanitize commit subjects in `porcelain.format_patch`

AFFECTED PACKAGES:
Unknown / Unknown
17 versions affected
ALIASES:
GHSA-555p-6grf-mh7f, PYSEC-2026-2462

> HISTORIQUE DES MODIFICATIONS

Première apparition
10/06/2026 23:16
Source: NVD
📊 ENRICHISSEMENT 01/11/2026 06:59
CWE
Champ modifié: Description CWE
Ancienne valeur:
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') - The product uses external input to construct a pathname that is intended to identify a file or directory that i...
Nouvelle valeur:
CWE-22: Improper Limitation of a Pathname to a Restricted Directory - The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneat...
📊 ENRICHISSEMENT 01/07/2026 06:01
CWE
Champ modifié: Description CWE
Ancienne valeur:
N/A
Nouvelle valeur:
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') - The product uses external input to construct a pathname that is intended to identify a file or directory that i...
📊 ENRICHISSEMENT 14/06/2026 05:00
REDHAT
Champ modifié: Sévérité Red Hat
Ancienne valeur:
N/A
Nouvelle valeur:
{ "threat_severity": "Low", "severity_scale": null }
📊 ENRICHISSEMENT 14/06/2026 05:00
REDHAT
Champ modifié: Red Hat
Ancienne valeur:
Non
Nouvelle valeur:
Oui
Total des modifications: 4 Dernière mise à jour: 6 days ago

> REFERENCES

https://github.com/jelmer/dulwich/commit/c2446e51b
https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5
https://github.com/jelmer/dulwich/security/advisories/GHSA-555p-6grf-mh7f
« BACK_TO_HOME