Black GitHub Action CVE-2026-114134
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessOpen pull request to victim repo
-
ExploitEdit pyproject.toml required-version to attacker reference
-
ExecutionAction installs unvalidated package in CI runner
-
ImpactExecute arbitrary code, steal CI secrets
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Trusted source inclusion only
|
| Exploitation Conditions | Exploitation requires the victim to use Black's GitHub Action with the non-default setting use_pyproject: true, and a CI workflow that runs that action against pull-request-supplied content; the attacker then submits a PR that rewrites tool.black.required-version in pyproject.toml to point at a malicious package (the pre-patch code accepted direct references such as URLs without validation). Limiting factors that reduce realistic risk: use_pyproject is opt-in and off by default; the action must be invoked in a workflow that executes untrusted PR changes; and GitHub by default requires a maintainer to approve workflow runs for first-time contributors, so unattended execution is most likely for returning or authorized contributors. The complete fix is upgrading to Black 26.10.1, which restricts required-version to released version specifiers. |
| Impact | No CVSS vector, EPSS score, or SSVC framework data was supplied, so quantitative exploitation-probability signals are unavailable and risk must be reasoned from the mechanism and decision label. This is not CISA KEV-listed and no active exploitation is reported, so it is 'no public exploit identified at time of analysis' in the strict sense - however, the GHSA advisory includes a step-by-step reproduction (a public PoC reference exists; it is not verified as working exploit code), lowering the barrier to weaponization. The real-world risk is gated by a non-default configuration: it only affects repositories using the Black GitHub Action with use_pyproject: true, and the attack requires a pull_request-triggered workflow that runs the action against untrusted PR content. Where those conditions hold, the impact is full remote code execution in the victim's CI runner (CWE-829, inclusion of functionality from an untrusted control sphere), which can expose CI secrets and poison builds - a genuine supply-chain concern. The vendor 'this_week' priority is consistent with a serious but conditionally-exploitable flaw rather than an act_now emergency; it is a real priority for CI-heavy Black Action users, but a high-severity-yet-config-limited issue for everyone else. Note the gap: severity cannot be cross-checked against a published CVSS because the input lists it as N/A. |
| Exploit ScenarioDerived | A victim project uses Black's GitHub Action with use_pyproject: true in a pull_request-triggered CI workflow. An attacker opens a PR that edits pyproject.toml so tool.black.required-version is a direct reference (e.g. a URL or git reference) pointing to an attacker-controlled package; when the action runs it installs that package unvalidated and executes attacker code in the runner. A public reproduction description exists in the GHSA advisory, though it is not verified as working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 22, 2026
The GitHub Action shipped with psf/black can be induced to install and execute attacker-controlled code when the optional use_pyproject: true input is enabled. Because the action read tool.black.required-version from the checked-out pyproject.toml and passed it to pip without validating it as a plain version specifier, a pull request that rewrites that value into a direct reference (such as a URL to a malicious package or wheel) causes pip to fetch and run that package inside the victim repository's CI workflow. Only repositories that opt into the non-default use_pyproject setting and run the action against pull-request-supplied content are exposed, and unattended execution is most plausible for returning or authorized contributors since GitHub normally gates first-time contributors behind maintainer workflow approval; the complete fix is Black 26.10.1, which now rejects anything other than released version specifiers.
RemediationAI
Vendor-released patch: Black 26.10.1. Upgrade the version of Black referenced by your workflow (or the pinned action/package) to 26.10.1, which contains the validation added in https://github.com/psf/black/pull/5510 (commit ac1f71563aeccf73cf13ece00f231d9d6c66a514) and rejects required-version values that are not released version specifiers. If immediate upgrade is not possible, the exposure can be removed by not setting use_pyproject: true, since the vulnerable code path only runs when that opt-in input is enabled; the trade-off is that the action then no longer selects a Black version automatically from pyproject.toml and the version must be pinned through the action's normal input instead. Where use_pyproject must stay enabled, restrict who can push pyproject.toml changes and require maintainer approval before workflows run for fork and first-time contributors, which limits but does not eliminate the issue because trusted or returning contributors can still land a malicious value in a pull request and an approving maintainer may not inspect the required-version line. Suspending automatic execution of the action on pull_request_target or similar triggers that combine untrusted content with elevated workflow context also reduces impact at the cost of losing automated formatting checks on external contributions. Per the advisory, upgrading to 26.10.1 is the complete fix.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-829 describes the inclusion of functionality from an untrusted control sphere, and that is precisely the pattern here: the action's main.py helper read_version_specifier_from_pyproject() parsed [tool.black] required-version out of the repository's pyproject.toml (requiring Python 3.11+ for tomllib) and handed the resulting string to a pip install invocation. In the pre-patch code the string was only lightly normalised (prefixing == or ~= for bare numeric values) and was otherwise returned verbatim, so a PEP 508 direct reference such as a URL pointing at a Black-named wheel from an attacker-controlled host would be accepted and installed, executing the package's setup/import-time code in the runner. The flaw is the same class as the earlier CVE-2026-31900 and was resolved in pull request #5510 (commit ac1f71563aeccf73cf13ece00f231d9d6c66a514), which now matches the value against the same BLACK_VERSION_RE used for black entries in dependency arrays and calls sys.exit(1) with an explicit error when the value is not a released version or version specifier. The vulnerability is confined to the repository's GitHub Action wrapper; the Black formatter package itself is only involved because the pinned Pip package range is below 26.10.1.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Attacker needs no repo privileges (PR:N) and acts over the network, but exploitation depends on the non-default use_pyproject config and a PR-triggered CI run, so AC:H; successful attack yields full RCE on the runner (C/I/A:H).
Estimated by vuln.today — no official severity rating has been published for this CVE yet.
DescriptionCVE.org
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.
Technical POC Analysis
CWE-829 (Inclusion of Functionality from Untrusted Control Sphere).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-114134 affects the psf/black GitHub Action when the optional use_pyproject flag is enabled, allowing an attacker-controlled pull request to execute malicious code within the victim repository's CI workflow. Only repositories that explicitly opt into this non-default setting and run the action on PR-supplied content are exposed, and unattended execution is most plausible for returning or authorized contributors. Leadership should prioritize remediation for affected repositories, as exploitation enables arbitrary code execution in CI environments with potential access to secrets and deployment credentials.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
GHSA-cg8m-r9f2-5wm2
CVE.org
Exploit-DB