CVE-2026-32274 json
Black: Arbitrary file writes from unsanitized user input in cache file name
published 2026-03-12 7 mo ago modified 2026-09-10 1 mo ago also EUVD-2026-11698 , GHSA-3936-cmfr-pm3m , PYSEC-2026-2121
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 53%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi black 26.3.1
- Red Hat Red Hat Ansible Automation Platform 2.5 1777393635, 1777403872
- Red Hat Red Hat Ansible Automation Platform 2.6 1777299023, 1777387242, 1777387537, 1777390240, 1777390333
- Red Hat Red Hat OpenShift AI 2.25 1776318795, 1776319179, 1776319185, 1776319193, 1776319275, 1776319453, 1776336534
- black Debian 13 25.1.0-3+deb13u1
- black Debian 14 26.3.1-1
debian advisories DEBIAN-CVE-2026-32274
- python-black SLES for SAP applications 16.0, SLES 16.0 25.1.0-160000.3.1
- python-black openSUSE Leap 15.6 24.3.0-150400.9.11.1
suse advisories SUSE-SU-2026:20928-1SUSE-SU-2026:0900-1
- ansible-lint openSUSE Tumbleweed 26.9.0-1.1
- python-black openSUSE Leap 16.0 25.1.0-160000.3.1
- python-black openSUSE Tumbleweed 26.3.1-1.1
opensuse advisories openSUSE-SU-2026:11856-1openSUSE-SU-2026:20417-1openSUSE-SU-2026:10372-1
- github.com/psf/black@4937fe6 commit
- github.com/psf/black@ed770ba commit
- github.com/psf/black#4176 pull request
- github.com/psf/black#5038 pull request
- github.com/psf/black/releases/tag/26.3.1 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-32274 updated cvss 7.5
black: Black: Arbitrary file writes from unsanitized user input in cache file name
-
Red Hat OpenShift Lightspeed openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 Red Hat Ansible Automation Platform Ansible Core 2 ansible-automation-platform/ee-minimal-rhel8, ansible-automation-platform/ee-minimal-rhel9, ansible-automation-platform-tech-preview/ee-minimal-rhel8, ansible-automation-platform-tech-preview/ee-minimal-rhel9 Red Hat OpenShift AI (RHOAI) rhoai/odh-model-registry-rhel8affected: workaround, no fix available
-
Red Hat OpenShift Virtualization 4 container-native-virtualization/vm-network-latency-checkup-rhel9affected: workaround, no fix planned “Will not fix”
-
Red Hat Ansible Automation Platform 2.5 ansible-automation-platform-25 1777393635, ansible-automation-platform-25 1777403872fixed: vendor fix RHSA-2026:13553
-
Red Hat Ansible Automation Platform 2.6 ansible-automation-platform-26 1777299023, ansible-automation-platform-26 1777387242, ansible-automation-platform-26 1777387537, ansible-automation-platform-26 1777390240, ansible-automation-platform-26 1777390333fixed: vendor fix RHSA-2026:13545
-
Red Hat OpenShift AI 2.25 rhoai 1776318795, rhoai 1776319179, rhoai 1776319185, rhoai 1776319193, rhoai 1776319275, rhoai 1776319453, +1 morefixed: vendor fix RHSA-2026:10184
-
Red Hat OpenShift AI 3.3 rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9 1789651387, rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9 1789651385, rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9 1790260954, rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9 1790331087, rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9 1790077488, rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9 1789983680, +1 morefixed: vendor fix RHSA-2026:73987
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-26/ee-supported-rhel9 Red Hat Ansible Automation Platform 2.5 ansible-automation-platform 1777407814, ansible-automation-platform 1777407821, ansible-automation-platform-25 1777191649, ansible-automation-platform-25 1777191659, ansible-automation-platform-25 1777191672, ansible-automation-platform-25 1777191685, +19 more Red Hat Ansible Automation Platform 2.6 ansible-automation-platform 1777410604, ansible-automation-platform 1777410621, ansible-automation-platform-26 1777163004, ansible-automation-platform-26 1777163348, ansible-automation-platform-26 1777163557, ansible-automation-platform-26 1777163594, +19 morenot affected: vulnerable code not present
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-mlflow-rhel9, rhoai/odh-kserve-agent-rhel9, rhoai/odh-kserve-router-rhel9, rhoai/odh-kserve-controller-rhel9, rhoai/odh-training-operator-rhel8, rhoai/odh-kserve-storage-initializer-rhel9not affected: vulnerable code not in execute path
show 1 moreshow fewer
-
Red Hat OpenShift AI 2.25 rhoai 1775144403, rhoai 1776243157, rhoai 1776243163, rhoai 1776243192, rhoai 1776243217, rhoai 1776243229, +64 more Red Hat OpenShift AI 3.3 rhoai/odh-cli-rhel9 1790070206, rhoai/rhai-cli-rhel9 1790070206, rhoai/odh-mlflow-rhel9 1789653606, rhoai/odh-trainer-rhel9 1790136369, rhoai/odh-maas-api-rhel9 1790131842, rhoai/odh-mlserver-rhel9 1789121365, +70 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 7 mo ago
Exploit prediction
0.69% chance of exploitation in the next 30 days, higher than 53% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.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 |
| CISA ADP | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| CNA | 4.0 | 8.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 |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | black | >=24.3.0, <26.3.1 <26.3.1 |
26.3.1 |
Affected products
- psf black
- Red Hat Red Hat Ansible Automation Platform 2.5
- Red Hat Red Hat Ansible Automation Platform 2.6
- Red Hat Red Hat OpenShift AI 2.25
- Red Hat OpenShift Lightspeed
- Red Hat Red Hat Ansible Automation Platform 2
- Red Hat Red Hat Ansible Automation Platform Ansible Core 2
- Red Hat Red Hat OpenShift AI (RHOAI)
- Red Hat Red Hat OpenShift Virtualization 4
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/psf/black/pull/4176
web
-
github.com
/psf/black/pull/5038
web, issue-tracking, patch
-
github.com
/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d
web, patch
-
github.com
/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9
web
-
access.redhat.com
/errata/RHSA-2026:10184
vendor-advisory, web, advisory
-
access.redhat.com
/errata/RHSA-2026:13545
vendor-advisory, web, advisory
-
access.redhat.com
/errata/RHSA-2026:13553
vendor-advisory, web, advisory
-
github.com
/psf/black/security/advisories/GHSA-3936-cmfr-pm3m
web, vendor-advisory, advisory
-
access.redhat.com
/security/cve/CVE-2026-32274
vdb-entry, web
-
bugzilla.redhat.com
/show_bug.cgi?id=2447111
issue-tracking, web, report
-
github.com
/psf/black/releases/tag/26.3.1
web, release-notes, advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml
web
-
security.access.redhat.com
/data/csaf/v2/vex/2026/cve-2026-32274.json
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-32274
advisory
-
github.com
/psf/black
package
Sources
- CVE List CVE-2026-32274
- GitHub Advisory GHSA-3936-cmfr-pm3m
- NVD CVE-2026-32274
- OSV PYSEC-2026-2121
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.