Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
psf black
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Black是Python Software Foundation开源的一个 Python 代码格式化程序。 Black 26.3.1之前版本存在路径遍历漏洞,该漏洞源于缓存文件名未清理--python-cell-magics选项的值,可能导致将缓存文件写入任意文件系统位置。

CVSS 8.7 · High EPSS 0.74% · P54

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 1

VendorProduct Version RangeStatus
psf black >= 24.3.0, < 26.3.1 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-32274

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Black: Arbitrary file writes from unsanitized user input in cache file name
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5
Vulnerability Title
Black 路径遍历漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Black是Python Software Foundation开源的一个 Python 代码格式化程序。 Black 26.3.1之前版本存在路径遍历漏洞,该漏洞源于缓存文件名未清理--python-cell-magics选项的值,可能导致将缓存文件写入任意文件系统位置。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
psf black >= 24.3.0, < 26.3.1 -

II. Public POCs for CVE-2026-32274

# POC Description Source Link Shenlong Link
AI-Generated POC Verified env Premium
Qwen3.6-35B-A3B · 10331 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-32274

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-32274 (4)

Vendor Advisories for CVE-2026-32274 (7)

Vendor Pages for CVE-2026-32274 (1)

Other References for CVE-2026-32274 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-32274

No comments yet


Leave a comment