CVE-2026-31900: Vulnerability in Python Black

Critical. 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...

GitHub Actions, CWE-20

Exploitation
None confirmed
Severity
9.8 of 10
Attack likelihood
0.5 % in 30 days
Fix
Fixed version known
Patch deadline
No deadline set

Details

Advisory ID
GHSA-v53h-f6m7-xcgm
EU ID
EUVD-2026-11315
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20
Published
7 Mar 2026
Last change
17 Jun 2026
Likelihood rank
Higher than 45 % of all rated vulnerabilities
Analysis status
Analyzed
Ecosystem
GitHub Actions

Affected products

Affected versions and the first fixed release

  • Python Black Before 26.3.0. Fixed in 26.3.0

Affected packages

Vulnerable version ranges and fixed releases

  • psf/black GitHub Actions, Affected before 26.3.0. Fixed in 26.3.0

Patches and fixes

Updates, commits and release notes

Related