CVE-2026-31900Python Black
High 8.7
Follow: this CVE · Python · Python Black We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 4.0
- 8.7
- EPSS
- —
- Auth required
- Yes
- Published
- Mar 11, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
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
What happens
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.
What to do
- Apply the vendor's security update for Black.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| GitHub Actions | psf/black |
< 26.3.0 |
26.3.0 |
— |
| PyPI | black |
< 26.3.0 |
26.3.0 |
pip install "black>=26.3.0" |
Per OSV / GitHub Advisories (GHSA-v53h-f6m7-xcgm, PYSEC-2026-2120). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | black | < 26.3.0 |
Official advisories
- Security update for python-black · SUSE · SUSE-SU-2026:20928-1 · Mar 24, 2026 High
- Security update for python-black · SUSE · openSUSE-SU-2026:20417-1 · Mar 24, 2026 High
- python311-black-26.3.1-1.1 on GA media · SUSE · openSUSE-SU-2026:10372-1 · Mar 14, 2026 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Mitigation Vendor Advisory