CVE-2026-31900 json
Black's vulnerable version parsing leads to RCE in GitHub Action
published 2026-03-07 8 mo ago modified 2026-07-13 3 mo ago also EUVD-2026-11315 , GHSA-v53h-f6m7-xcgm , PYSEC-2026-2120
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 44%
- public exploits
- 0
- none known
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.
Patch / fix
- github-actions psf/black 26.3.0
- pypi black 26.3.0
- psf black 26.3.0
- python black 26.3.0
- black Debian 14 26.3.1-1
debian advisories DEBIAN-CVE-2026-31900
- python-black SLES for SAP applications 16.0, SLES 16.0 25.1.0-160000.3.1
suse advisories SUSE-SU-2026:20928-1
- python-black openSUSE Leap 16.0 25.1.0-160000.3.1
- python-black openSUSE Tumbleweed 26.3.1-1.1
opensuse advisories openSUSE-SU-2026:20417-1openSUSE-SU-2026:10372-1
- github.com/psf/black@0a2560b commit
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 7 mo ago
Exploit prediction
0.52% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.7 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| CNA | 4.0 | 8.7 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| github-actions | psf/black | <26.3.0 |
26.3.0 |
| pypi | black | <26.3.0 |
26.3.0 |
Affected products
- psf black
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611
web, patch
-
github.com
/psf/black/security/advisories/GHSA-v53h-f6m7-xcgm
web, mitigation, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-31900
advisory
-
github.com
/psf/black
package
Sources
- CVE List CVE-2026-31900
- GitHub Advisory GHSA-v53h-f6m7-xcgm
- NVD CVE-2026-31900
- OSV PYSEC-2026-2120
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.