CVE-2026-31900: psf black Improper Input Validation
Vulnerability summary
CVE-2026-31900 is a critical (CVSS 9.8) Improper Input Validation vulnerability in psf black. EPSS estimates a 0.66% chance of exploitation in the next 30 days, higher than 50.6% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 3 · Related 3Timeline
- 11-03-2026PublishedVulnerability first disclosed.
- 13-03-2026Last modifiedVulnerability information updated.
Description
Black is the uncompromising Python code formatter. Black provides a GitHub action for formatting code. This action supports an option, use_pyproject: true, for reading the version of Black to use from the repository pyproject.toml. A malicious pull request could edit pyproject.toml to use a direct URL reference to a malicious repository. This could lead to arbitrary code execution in the context of the GitHub Action. Attackers could then gain access to secrets or permissions available in the context of the action. Version 26.3.0 fixes this vulnerability.
CVSS metrics
7 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- NVDNIST8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/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 · PypiEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.66%
Chance of exploitation in the next 30 days
Percentile
51%
Versus all other CVEs
30-day change
+0.20 pp
From 0.46% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- blackAll versions (No fix recorded)
Psf1 product
- black< 26.3.0
PyPI1 product
- black< 26.3.0
Python1 product
- black< 26.3.0
Ubuntu1 product
- blackAll versions (No fix recorded)
5 vendors · 5 products
References
5 links- github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgmX Refsource CONFIRMAdvisoryMitigationVendor Advisory