---
id: "CVE-2026-114134"
kind: "vulnerability"
aliases: ["CVE-2026-114134", "GHSA-cg8m-r9f2-5wm2"]
title: "Black: GitHub Action installs unvalidated required-version from pyproject.toml"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "black", "fixed": ["26.10.1"], "affected": "< 26.10.1", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["black", "ci", "cwe-829", "github-actions", "package", "python"]
not_affected_if: ["default-config", "no-required-version-in-pyproject", "use_pyproject-not-set"]
published_at: "2026-10-22T16:18:57+00:00"
first_seen_at: "2026-10-23T19:11:31+00:00"
updated_at: "2026-10-23T20:09:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-cg8m-r9f2-5wm2", "first_seen_at": "2026-10-23T19:11:31+00:00"}]
---

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

The Black GitHub Action reads the version to install from tool.black.required-version in pyproject.toml when use_pyproject is true, and does not validate it. A pull request that points that value at an attacker-controlled package source can run arbitrary code in the context of the victim's CI run and repository.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:black affected < 26.10.1 fixed 26.10.1

## How to check

Search the repo's workflow files for psf/black or 'uses: psf/black' with use_pyproject: true.
Check pyproject.toml for a [tool.black] section with required-version set.

## Fix

Upgrade the Black GitHub Action to a release that includes the fix (affected below 26.10.1, fixed in 26.10.1).
Until then, remove use_pyproject: true or drop required-version from pyproject.toml, and review open PRs that edit pyproject.toml.

## Timeline

- 2026-10-23T19:11:31+00:00 ghsa https://github.com/advisories/GHSA-cg8m-r9f2-5wm2

## From the sources

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

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
