Impact
The vulnerability is in Black's GitHub Action when the use_pyproject option is enabled. The action reads pyproject.toml from the repository and interprets a direct URL as the source of the Black executable. An attacker who can submit a pull request can modify pyproject.toml to point to a malicious repository. This results in arbitrary code execution within the action runtime, allowing the attacker to access secrets or other permissions that the action possesses. The weakness stems from improper input validation (CWE-20).
Affected Systems
Vendor psf: black, product Black code formatter and GitHub Action. The vulnerability affects all deployments that use Black in GitHub Actions with use_pyproject: true and any Black version earlier than 26.3.0. No specific sub-version details are provided beyond the fix in 26.3.0.
Risk and Exploitability
The CVSS score is 8.7, indicating a high severity of potential impact. The EPSS score is less than 1%, suggesting the exploit probability is currently low, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is a malicious pull request that modifies pyproject.toml to reference an attacker-controlled repository. Exploitation requires the attacker to have the ability to forge a pull request, which is feasible for core contributors or attackers with compromised credentials. Once exploited, the attacker can execute arbitrary commands in the action environment.
OpenCVE Enrichment
Github GHSA