CVE-2026-114134

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

Published Nov 5, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
Black is the uncompromising Python code formatter. Prior to 26.10.1, the Black GitHub Action with use_pyproject: true accepts tool.black.required-version from pyproject.toml without validating that it is a released Black version specifier. An attacker who can submit a pull request can change that field to a direct reference to attacker-controlled code, causing the workflow to install and execute the code in the victim repository's GitHub Actions context. This issue is fixed in version 26.10.1.

Analysis

AI-generated

Technical impact

Black is a Python code formatter delivered as a GitHub Action that can read a required‑version from a repository’s pyproject.toml. Before version 26.10.1 the action did not validate that the value came from a released Black version. An attacker who can submit a pull request to a repository that uses the action with use_pyproject: true can replace that field with a reference to arbitrary code. When the workflow runs, the action installs the referenced package in the GitHub Actions runner and executes it, giving the attacker remote code execution on the runner that has the same privileges as the workflow. The vulnerability allows an attacker to run malicious code within the workflow context and may lead to complete compromise of the repository’s secrets and resources.

Affected Systems

Vendors and products affected include the Python Software Foundation’s Black formatter. Any repository that uses the Black GitHub Action with use_pyproject: true and is running a Black version earlier than 26.10.1 is impacted. The fix is issued in version 26.10.1; repositories using that or later versions are not vulnerable.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity vulnerability. EPSS is not available, so the likelihood of exploitation cannot be quantified from that metric, but the flaw is publicly disclosed and can be exploited by any contributor to a repository that runs the action. The vulnerability is not listed in CISA’s KEV catalog. The attack vector is inferred from the description: an attacker must control a pull request to the target repository. Once the pull request is merged, the malicious required‑version will be installed and executed automatically during the next workflow run, giving the attacker remote code execution on the GitHub Actions runner.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the repository’s Black formatter to version 26.10.1 or later to ensure the action validates the required‑version field.
  • If the repository cannot immediately upgrade, add a pre‑commit check or audit that tool.black.required-version values refer to a supported version specifier and block workflow runs with unauthenticated values.
  • Review and reject any pull request that modifies pyproject.toml to contain a required-version that is not a cryptographically signed released Black version; optionally revert merged PRs that introduced a vulnerable setting.

Generated by OpenCVE AI on November 5, 2026 at 22:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-cg8m-r9f2-5wm2 Black: GitHub Action installs unvalidated required-version from pyproject.toml
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Psf
Psf black
Vendors & Products Psf
Psf black
Type Values Removed Values Added
Description Black is the uncompromising Python code formatter. Prior to 26.10.1, the Black GitHub Action with use_pyproject: true accepts tool.black.required-version from pyproject.toml without validating that it is a released Black version specifier. An attacker who can submit a pull request can change that field to a direct reference to attacker-controlled code, causing the workflow to install and execute the code in the victim repository's GitHub Actions context. This issue is fixed in version 26.10.1.
Title Black: GitHub Action installs unvalidated required-version from pyproject.toml
Weaknesses CWE-829
References
Metrics cvssV4_0

{'score': 8.7, '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'}

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 9, 2026, 5:42 PM
Reserved
Oct 20, 2026, 9:53 PM
Status
Awaiting Analysis
Published
Nov 5, 2026, 9:18 PM
Modified
Nov 12, 2026, 10:18 PM
Severity
Important
Public date
Nov 5, 2026, 8:22 PM