CVE-2026-31900: psf black · Improper Input Validation
Affects psf blackSource CVE Database V5
Not known to be exploited · CVSS 8.7 High : upgrade to 26.3.0 soon.
Data as of 30 Oct 2026, 06:59 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 41% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 26.3.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 11 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade psf black to 26.3.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| psfblack | Affected
| Fixed in
|
PyPIblackpkg:pypi/blackOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate this vulnerability, organizations should immediately upgrade Black to version 26.3.0 or later in all environments where it is used, particularly in GitHub Actions workflows. Review and restrict the use of the 'use_pyproject: true' option to trusted repositories only, or disable it if not essential. Implement strict branch protection rules and pull request review policies to prevent untrusted contributors from modifying pyproject.toml files. Use GitHub Actions secrets and environment protection rules to limit the scope of accessible credentials during workflows. Employ dependency scanning and code analysis tools to detect unauthorized changes to configuration files. Additionally, consider isolating CI environments and limiting permissions granted to GitHub Actions to the minimum necessary. Monitor CI/CD logs for unusual activity and audit repository changes regularly. Educate development teams about the risks of supply chain attacks and the importance of validating third-party code sources.
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.