Black's vulnerable version parsing leads to RCE in GitHub Action
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | black | before 26.3.0 | 26.3.0 | Patch available | CNA |
| — | psf/black (GitHub Actions) | before 26.3.0 | 26.3.0 | Patch available | GHSA-v53h-f6m7-xcgm |
- black Vendorpython-pillow Affected before 26.3.0 Fixed in 26.3.0 Patch available CNA
- psf/black (GitHub Actions) Vendor— Affected before 26.3.0 Fixed in 26.3.0 Patch available GHSA-v53h-f6m7-xcgm
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:black:*:*:*:*:*:*:*:* | before 26.3.0 | Vulnerable | python-pillow |
- cpe:2.3:a:python:black:*:*:*:*:*:*:*:* Versions before 26.3.0 Vulnerable ·python-pillow
Remediation
- Fix · CNA black (psf) Fixed in 26.3.0
- Fix · GHSA-v53h-f6m7-xcgm psf/black (GitHub Actions) Fixed in 26.3.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31900
- 2026-10-03 Alias added: GHSA-v53h-f6m7-xcgm
- 2026-10-08 EPSS moved to the 50th–90th percentile
- 2026-10-25 EPSS moved to the below the 50th percentile
References
More python-pillow Black vulnerabilities
- TI-2026-24803 Black: Arbitrary file writes from unsanitized user input in cache file name CVSS 4.0HIGH 8.7
Sources
- CVE-2026-31900 · CVE Program
- CVE-2026-31900 · NVD
- FIRST EPSS
- GHSA-v53h-f6m7-xcgm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences