# CVE-2026-31900: Black's vulnerable version parsing leads to RCE in GitHub Action

- Priority: **Routine**
- Reason: Not severe (CVSS 8.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-03-11 · Modified: 2026-03-13
- Aliases: PYSEC-2026-2120, GHSA-v53h-f6m7-xcgm, UBUNTU-CVE-2026-31900, DEBIAN-CVE-2026-31900
- Record: https://cvemate.com/vulnerability/CVE-2026-31900 · JSON: https://cvemate.com/vulnerability/CVE-2026-31900/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.522%, percentile 45.819%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian black (Debian): All versions (No fix recorded) \| \< 26.3.1-1
- ubuntu black (Ubuntu): All versions (No fix recorded)
- psf black: \< 26.3.0
- PyPI black (PyPI): \< 26.3.0
- python black: \< 26.3.0

## References

- <https://github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgm>
- <https://github.com/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611>
- <https://ubuntu.com/security/CVE-2026-31900>
- <https://www.cve.org/CVERecord?id=CVE-2026-31900>
- <https://security-tracker.debian.org/tracker/CVE-2026-31900>

---

Data as of 2026-12-05T04:39:20.519Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
