CVE-2026-114134: Pip/black vulnerability
Summary
The GitHub Action bundled with Black can read the version from tool.black.required-version if usepyproject 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 usepyproject: 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 usepyproject: true setting.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/blackto a version that resolves this vulnerability.Fixed in 26.10.1
Event History
Frequently Asked Questions
Which workflows are exposed?
Repositories using the GitHub Action bundled with psf/black are affected when the action is configured with use_pyproject: true. The issue applies because the action reads tool.black.required-version from pyproject.toml in that configuration.
What does an attacker need to exploit this?
An attacker needs to be able to submit a pull request that changes pyproject.toml. They can set tool.black.required-version to point Black at a malicious repository, causing untrusted code to execute in the victim repository's GitHub Actions context.
Are workflows using the default action configuration affected?
The described exploitation requires use_pyproject: true. The provided information does not identify workflows without that setting as affected.
What can be done before updating the action?
Do not enable use_pyproject: true, or avoid allowing untrusted pull requests to modify pyproject.toml in workflows where the Black action runs. Review pull requests that alter tool.black.required-version, since that value is used without validation.