Improper input validation in Psf Black
CVE-2026-31900
Black is the uncompromising Python code formatter. Black provides a GitHub action for formatting code. This action supports an option, use_pyproject: true, for reading the version of Black to use from the repository pyproject.toml. A malicious pull request could edit pyproject.toml to use a direct URL reference to a malicious repository. This could lead to arbitrary code execution in the context of the GitHub Action. Attackers could then gain access to secrets or permissions available in the context of the action. Version 26.3.0 fixes this vulnerability.
Vulnerability class: Drupalgeddon 2 (CVE-2018-7600)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.005, 44.9th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Psf Black — versions < 26.3.0
- Python Black
Weakness classification (CWE)
Public exploits and proof-of-concept code
1 public repository with exploit or proof-of-concept code for this CVE:
- Batosay1337Lab/cve-2026-31900-lab (1 star, last pushed 2026-04-12): CVE-2026-31900 Vulnerable Lab - psf/black GitHub Action RCE
References
- https://github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgm (Mitigation, Vendor Advisory)
- https://github.com/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611 (Patch)
This CVE has public exploit evidence. See the latest CVEs with public exploits.