Skip to main content
← All vulnerabilities
CVE-2026-32274GHSA-3936-CMFR-PM3MPYSEC-2026-2121

Black: Arbitrary file writes from unsanitized user input in cache file name

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 26.3.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: partial

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.

Timeline

  1. CVE published1 day
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: partial

    143 days
  3. Record last updated

Affected versions

  • psf black

    From 24.3.0 · fixed in 26.3.1

  • blackPyPI

    From 24.3.0 · fixed in 26.3.1

  • blackPyPI

    fixed in 26.3.1

References 13

GitHub · psf/black

access.redhat.com

bugzilla.redhat.com

GitHub · pypa/advisory-database

security.access.redhat.com