LiveActive security incident?Get immediate response
CVE Record

CVE-2026-32274: Black: Arbitrary file writes from unsanitized user input in cache file name

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.

HighCVSS 8.7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Black, a Python code formatter, could write cache files outside its intended location before version 26.3.1. The issue depends on attacker control of a formatting option value. Business risk is highest in automated tooling or CI environments that run Black with inputs influenced by untrusted users.

Executive priority

Treat as a high-priority developer tooling update, not an internet-facing emergency. Prioritize CI systems and shared build environments where untrusted code or configuration may be processed.

Technical view

CVE-2026-32274 is a CWE-22 path traversal-style flaw in Black before 26.3.1. The --python-cell-magics option was incorporated into a cache filename without sanitization, allowing cache writes to arbitrary filesystem locations where the Black process has permission.

Likely exposure

Exposure is most likely in Python development, CI, editor, or pre-commit workflows using Black versions before 26.3.1, especially where untrusted users can affect formatter arguments or configuration.

Exploitation context

The source bundle does not identify KEV listing or active exploitation. Exploitation requires control over the affected option value and depends on the filesystem permissions of the Black process.

Researcher notes

The fix is identified in Black 26.3.1, with related GitHub advisory, pull request, commit, and release references. Evidence provided does not establish remote service compromise or in-the-wild exploitation.

Mitigation direction

  • Upgrade Black to version 26.3.1 or later.
  • Use vendor-supported fixed packages where Black is supplied by a distribution.
  • Review CI and formatter workflows for untrusted control of Black options.
  • Restrict who can modify formatter configuration and pipeline inputs.
  • Run formatting jobs with least necessary filesystem write permissions.

Validation and detection

  • Inventory Black versions in lockfiles, virtual environments, containers, and CI images.
  • Confirm installed Black versions are 26.3.1 or later.
  • Check CI, editor, and pre-commit configuration for --python-cell-magics usage.
  • Verify untrusted contributors cannot change formatter arguments without review.
  • Review vendor advisories for applicable Red Hat package status.
Prepared
Confidence
high
Sources
12

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-32274 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.7 (4.0)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
11Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: partial

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.7CVSS 4.0HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NGitHub_M
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N3.93.6redhat-SADP

Vulnerability scoring details

Base CVSS 4.0 score

8.7High
CVSS 4.0 vector shape for CVE-2026-32274Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPblack: Black: Arbitrary file writes from unsanitized user input in cache file name
other:Red Hat severity ratingcvssV3_1
  • 2026-03-12T20:01:22.957Z: Reported to Red Hat.
  • 2026-03-12T19:47:07.464Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
psfblack< 26.3.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.