Back
CVE-2026-32274
Black: Arbitrary file writes from unsanitized user input in cache file name
High8.7EPSS 0.65%
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 4.0 | High8.7 | 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 |
| redhat-SADPADP (enrichment) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 4.0 | High8.7 | 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 |
- EPSS (exploitation in 30 days)
- 0.65% · top 49% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: partial
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.7.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
References (13)
- https://github.com/psf/black/security/advisories/GHSA-3936-cmfr-pm3m (opens in a new tab)x_refsource_CONFIRM
- https://github.com/psf/black/pull/4176 (opens in a new tab)x_refsource_MISC
- https://github.com/psf/black/pull/5038 (opens in a new tab)x_refsource_MISC
- https://github.com/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d (opens in a new tab)x_refsource_MISC
- https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9 (opens in a new tab)x_refsource_MISC
- https://access.redhat.com/errata/RHSA-2026:10184 (opens in a new tab)x_refsource_MISCvendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:13545 (opens in a new tab)x_refsource_MISCvendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:13553 (opens in a new tab)x_refsource_MISCvendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2026-32274 (opens in a new tab)x_refsource_MISCvdb-entryx_refsource_REDHAT
- https://bugzilla.redhat.com/show_bug.cgi?id=2447111 (opens in a new tab)x_refsource_MISCissue-trackingx_refsource_REDHAT
- https://github.com/psf/black/releases/tag/26.3.1 (opens in a new tab)x_refsource_MISC
- https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml (opens in a new tab)x_refsource_MISC
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json (opens in a new tab)x_refsource_MISCx_sadp-csaf-vex
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-3936-cmfr-pm3m (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-32274)Record last updated .