Black
Black's vulnerable version parsing leads to RCE in GitHub Action
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 26.3.0
Fixed in 26.3.0
Mitigation
Upgrade black to 26.3.0 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 31 days after publication; not in CISA KEV. First PoC: Batosay1337Lab/cve-2026-31900-lab (created 11 Apr 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Batosay1337Lab/cve-2026-31900-lab | 11 Apr 2026 +31 d | 1 | PoC
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.