CVE-2026-32274Python Black
High 8.7 No auth needed
Follow: this CVE · Python · Python Black We alert you by email or Slack (account required).
- Priority
- 67
- CVSS 4.0
- 8.7
- EPSS
- —
- Auth required
- No
- Published
- Mar 12, 2026
- Updated
- Aug 3, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
Black is the uncompromising Python code formatter. Starting in version 24.3.0 and prior to version 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.
What to do
- Apply the vendor's security update for Black.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | black |
≥ 24.3.0 < 26.3.1 |
26.3.1 |
pip install "black>=26.3.1" |
| PyPI | black |
< 26.3.1 |
26.3.1 |
pip install "black>=26.3.1" |
Per OSV / GitHub Advisories (GHSA-3936-cmfr-pm3m, PYSEC-2026-2121). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | black | < 26.3.1 |
Official advisories
- ansible-lint-26.9.0-1.1 on GA media · SUSE · openSUSE-SU-2026:11856-1 · Sep 23, 2026 High
- Security update for python-black · SUSE · SUSE-SU-2026:20928-1 · Mar 24, 2026 High
- Security update for python-black · SUSE · openSUSE-SU-2026:20417-1 · Mar 24, 2026 High
Also: SUSE (+2)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- bugzilla.redhat.com
- github.com Patch
- github.com
- github.com
- github.com Issue Tracking Patch
- github.com Release Notes
- github.com Vendor Advisory
- github.com
- security.access.redhat.com