CVE-2026-32274
Black: Arbitrary file writes from unsanitized user input in cache file name
CVSS Score
7.5
EPSS Score
0.0%
EPSS Percentile
0th
Black is the uncompromising Python code formatter. Prior to 26.3.1, Black writes a cache file, the name of which is computed from various formatting options. The value of the --python-cell-magics option was placed in the filename without sanitization, which allowed an attacker who controls the value of this argument to write cache files to arbitrary file system locations. Fixed in Black 26.3.1.
| CWE | CWE-22 |
| Vendor | psf |
| Product | black |
| Published | Mar 12, 2026 |
| Last Updated | Jul 15, 2026 |
Stay Ahead of the Next One
Get instant alerts for psf black
Be the first to know when new high vulnerabilities affecting psf black are published โ delivered to Slack, Telegram or Discord.
Get Free Alerts โ
Free ยท No credit card ยท 60 sec setup
Affected Versions
psf / black
< 26.3.1
References
github.com: https://github.com/psf/black/security/advisories/GHSA-3936-cmfr-pm3m github.com: https://github.com/psf/black/pull/5038 github.com: https://github.com/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d github.com: https://github.com/psf/black/releases/tag/26.3.1 access.redhat.com: https://access.redhat.com/security/cve/CVE-2026-32274 bugzilla.redhat.com: https://bugzilla.redhat.com/show_bug.cgi?id=2447111 security.access.redhat.com: https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json access.redhat.com: https://access.redhat.com/errata/RHSA-2026:13553 access.redhat.com: https://access.redhat.com/errata/RHSA-2026:13545 access.redhat.com: https://access.redhat.com/errata/RHSA-2026:10184