NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

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

highCVSS 4.0 8.7 · 3.1 7.5GHSA-3936-cmfr-pm3m

Impact 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. Patches Fixed in Black 26.3.1.

Published Mar 12, 2026 · Updated Aug 3, 2026

Affected packages

black

Ecosystem
PyPI
Affected
>= 24.3.0, < 26.3.1
Fixed in
26.3.1
Check
pip show black

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

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.

Patches

Fixed in Black 26.3.1.

Workarounds

Do not allow untrusted user input into the value of the --python-cell-magics option.

Credited to fg0x0, shaked-seal.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries