High

Black: GitHub Action installs unvalidated required-version from pyproject.toml

  • Disclosed: 22.10.2026
  • Updated: 25.10.2026 10:00

Summary

The GitHub Action bundled with Black can read the version from tool.black.required-version if use_pyproject is set to True. This version is not validated and therefore can be used to execute untrusted code in the context of a victim's repository.

Details

This is similar to the previous CVE-2026-31900. The value in tool.black.required-version is accepted as the version to be installed by the action without validation.

Proof of concept

Reproduction requires a victim to use Black's GitHub Action with use_pyproject: true. The attacker would then issue a PR to the victim's repository with pyproject.toml edited so that Black points to a malicious repository.

Impact

This is a remote code execution vulnerability impacting users using the GitHub Action bundled with psf/black and using the use_pyproject: true setting.

What to do

Upgrade black to version 26.10.1 or later.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) black < 26.10.1 26.10.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-829
Platform
Python (PyPI)
Package
black
Disclosed
22.10.2026
Updated
25.10.2026 10:00

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-cg8m-r9f2-5wm2 - CC BY 4.0

Vulnerability history: black

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
03.2024 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 2
  • Medium 1

Disclosures per year

  1. 2024: 1
  2. 2025: 0
  3. 2026: 3
  1. Black: GitHub Action installs unvalidated required-version from pyproject.toml this entry
    High CVE-2026-114134 < 26.10.1 26.10.1
  2. High · 7.5 CVE-2026-32274 >= 24.3.0, < 26.3.1 26.3.1
  3. Medium · 5.3 CVE-2024-21503 < 24.3.0 24.3.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.