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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2026-03-07T02:32:27.000Z
- Modified: 2026-07-13T07:26:50.828Z
- Also known as: GHSA-v53h-f6m7-xcgm, PYSEC-2026-2120
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- psf black: < 26.3.0
- psf/black (GitHub Actions): before 26.3.0
- python black: before 26.3.0
- black (PyPI): before 26.3.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgm> (advisory, mitigation, vendor-advisory, web)
- <https://github.com/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-31900> (advisory)
- <https://github.com/psf/black> (package)

## Sources

- CVE List: [CVE-2026-31900](https://www.cve.org/CVERecord?id=CVE-2026-31900), CVE Terms of Use, modified 2026-03-13
- GitHub Advisory Database: [GHSA-v53h-f6m7-xcgm](https://github.com/advisories/GHSA-v53h-f6m7-xcgm), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-31900](https://nvd.nist.gov/vuln/detail/CVE-2026-31900), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2120](https://osv.dev/vulnerability/PYSEC-2026-2120), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-31900 · Whole record: https://cve.day/CVE-2026-31900.json · Rebuilt by cve.day 2026-11-25T22:59:15.771Z
