CVE-2026-31900: PYSEC-2026-2120 - Black is the uncompromising Python code formatter. Black provides a GitHub action for formatting…

CVE-2026-31900 · Severity: low · CVSS 3.1 · Published 2026-03-11

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.

Technologies: black (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-31900 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31900 being exploited in the wild.
How severe is CVE-2026-31900?
Low severity, with a CVSS score of 3.1, published 11 March 2026.
Which products and versions are affected?
black (PyPI) ECOSYSTEM:introduced=0,fixed=26.3.0.
Is there a fix for CVE-2026-31900?
Yes. black (PyPI): upgrade to 26.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2026-31900?
Check whether you run black (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • black (PyPI): upgrade to 26.3.0 or later
    pip install "black>=26.3.0"

Affected products

  • black (PyPI) ECOSYSTEM:introduced=0,fixed=26.3.0

Identifiers

  • CVE-2026-31900
  • PYSEC-2026-2120

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.