Path traversal in black - CVE-2026-32274

 

Path traversal in black - CVE-2026-32274

Published: November 25, 2026


Vulnerability identifier: #VU170302
CSH Severity: Low
CVSS v4: 6.9 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-32274
CWE-ID: CWE-22
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to write cache files to arbitrary locations permitted by the Black process's filesystem permissions.

The vulnerability exists due to improper path restriction in Black's cache filename generation when it incorporates the unsanitized value of the --python-cell-magics option. A local user can control that option's value to redirect cache writes outside the intended cache directory.


Affected software

black

How to mitigate CVE-2026-32274

Install security update from vendor's website.

black - update to 26.3.1

External References