Security mailing lists by PureSourceCode

CVE-2026-32274

HIGH 8.7CVSS 4.0

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

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.

Published
12 Mar 2026
Last modified
10 Sep 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-22
Also known as
GHSA-3936-cmfr-pm3mPYSEC-2026-2121
Sources
NVDJSONOSV GHSA-3936-cmfr-pm3mJSONOSV PYSEC-2026-2121JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 4.0 HIGH 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
OSV GitHub CVSS 4.0 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
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
OSV GitHub CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
OSV PyPA CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD python black
cpe:2.3:a:python:black:*:*:*:*:*:python:*:*
< 26.3.1 26.3.1
OSV PyPI black >= 24.3.0, < 26.3.1 26.3.1
OSV PyPI black < 26.3.1 26.3.1

References

History

  • 25 Nov 2026 21:01 UTC · NVD: first stored (published 12 Mar 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 12 Mar 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 Mar 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.