Black: Arbitrary file writes from unsanitized user input in cache file name
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Partial Red Hat: 4 fixed, 4 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | black | 24.3.0 to before 26.3.1 | 26.3.1 | Patch available | CNA |
| — | black (PyPI) | 24.3.0 to before 26.3.1 | 26.3.1 | Patch available | GHSA-3936-cmfr-pm3m |
- black Vendorpython-pillow Affected 24.3.0 to before 26.3.1 Fixed in 26.3.1 Patch available CNA
- black (PyPI) Vendor— Affected 24.3.0 to before 26.3.1 Fixed in 26.3.1 Patch available GHSA-3936-cmfr-pm3m
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:black:*:*:*:*:*:python:*:* | before 26.3.1 | Vulnerable | python-pillow |
- cpe:2.3:a:python:black:*:*:*:*:*:python:*:* Versions before 26.3.1 Vulnerable ·python-pillow
Remediation
- Fix · CNA black (psf) Fixed in 26.3.1
- Fix · GHSA-3936-cmfr-pm3m black (PyPI) Fixed in 26.3.1 Advisory →
Red Hat 4 advisories
- RHSA-2026:73987 Released 2026-09-30 · Red Hat rating CriticalRHOAI 3.3.7 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.3 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-dashboard-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-argo-argoexec-rhel9 +47
- RHSA-2026:13553 Released 2026-05-04 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.5 Container Release Update
- Red Hat Ansible Automation Platform 2.5 registry.redhat.io/ansible-automation-platform-25/ee-supported-rhel8, registry.redhat.io/ansible-automation-platform-25/gateway-rhel8, registry.redhat.io/ansible-automation-platform-25/hub-rhel8 +2
- RHSA-2026:13545 Released 2026-05-04 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.6 Container Release Update
- Red Hat Ansible Automation Platform 2.6 registry.redhat.io/ansible-automation-platform-26/ansible-dev-tools-rhel9, registry.redhat.io/ansible-automation-platform-26/controller-rhel9, registry.redhat.io/ansible-automation-platform-26/eda-controller-rhel9 +11
Show 1 more Red Hat advisories
- RHSA-2026:10184 Released 2026-04-23 · Red Hat rating ImportantRHOAI 2.25.5 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-caikit-tgis-serving-rhel9, registry.redhat.io/rhoai/odh-dashboard-rhel9 +47
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Lightspeed | Affected | No fix yet |
| Red Hat Ansible Automation Platform Ansible Core 2 | Affected | No fix yet |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat OpenShift Virtualization 4 | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2.5 | Fixed | RHSA-2026:13553 |
| Red Hat Ansible Automation Platform 2.6 | Fixed | RHSA-2026:13545 |
| Red Hat OpenShift AI 2.25 | Fixed | RHSA-2026:10184 |
| Red Hat OpenShift AI 3.3 | Fixed | RHSA-2026:73987 |
Not affected: 6 products
- Red Hat Ansible Automation Platform 2
- Red Hat Ansible Automation Platform 2.5
- Red Hat Ansible Automation Platform 2.6
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 2.25
- Red Hat OpenShift AI 3.3
Timeline
- 2026-10-02 Threatist record created from CVE-2026-32274
- 2026-10-03 Alias added: GHSA-3936-cmfr-pm3m
- 2026-10-07 Fix available: RHSA-2026:73987 · Red Hat
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-10-27 EPSS moved to the 50th–90th percentile
References
Patch 2
Advisory 2
Other 11
- https://github.com/psf/black/pull/4176
- https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9
- https://access.redhat.com/errata/RHSA-2026:10184
- https://access.redhat.com/errata/RHSA-2026:13545
- https://access.redhat.com/errata/RHSA-2026:13553
- https://access.redhat.com/security/cve/CVE-2026-32274
- https://bugzilla.redhat.com/show_bug.cgi?id=2447111
- https://github.com/psf/black/releases/tag/26.3.1
- https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json
- https://github.com/psf/black
More python-pillow Black vulnerabilities
- TI-2026-24452 Black's vulnerable version parsing leads to RCE in GitHub Action CVSS 4.0HIGH 8.7
Sources
- CVE-2026-32274 · CVE Program
- CVE-2026-32274 · NVD
- FIRST EPSS
- GHSA-3936-cmfr-pm3m · GitHub Advisory Database · CC BY 4.0
- CVE-2026-32274 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences