CVE-2026-31900

Critical

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.

SeverityCritical
CVSS9.8
Exploit probability—
ProductPython Black
PublishedMar 11, 2026
First seenMar 11, 2026

How to fix

Update
  • python black26.3.0 or later
  • black26.3.0 or later

Affected products

ProductAffected versionsFixed in
python blackv < 26.3.026.3.0
blackPyPIv < 26.3.026.3.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.