Black: GitHub Action installs unvalidated required-version from pyproject.toml enabling RCE (CVE-2026-114134)
Severity: high · Patch status: patched · Since 2026-10-10 · CVE-2026-114134, CVE-2026-31900
The GitHub Action bundled with Black accepts the version from tool.black.required-version in pyproject.toml when usepyproject is set to true, without validating it. An attacker can open a PR modifying pyproject.toml to point Black at a malicious repository, causing the Action to install and execute attacker-controlled code in the context of the victim's repository — remote code execution in CI. This is similar to the earlier CVE-2026-31900. Only users of the psf/black GitHub Action with usepyproject: true are affected; the widely-used black package itself is unaffected for normal use. Fixed in black 26.10.1 (commit ac1f715, release 26.10.1). Published Oct 10, 2026; advisory database entry Oct 22, 2026.
What to do
- If you use psf/black's GitHub Action with use_pyproject: true, pin/update the action to black 26.10.1 or later immediately
- Review recent PRs that modified pyproject.toml (tool.black.required-version) for tampering, and audit CI logs for unexpected installs
- Avoid use_pyproject: true or validate/pin the required-version yourself; restrict who can modify pyproject.toml via branch protection and required reviews
- If compromise is suspected, rotate repository/CI secrets and review commits and workflow runs from the affected period
Fixed versions
Sources
All live incidents on Threat Watch