Vulnerability 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.
CVSS Score
CRITICAL
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Python | Black | < 26.3.0 |
Related Weaknesses (CWE)
References
- https://github.com/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611Patch
- https://github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgmMitigationVendor Advisory
FAQ
What is CVE-2026-31900?
CVE-2026-31900 is a vulnerability with a CVSS score of 9.8 (CRITICAL). 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...
How severe is CVE-2026-31900?
CVE-2026-31900 has been rated CRITICAL with a CVSS base score of 9.8/10. This is considered a critical vulnerability requiring immediate attention.
Is there a patch for CVE-2026-31900?
Check the references section above for vendor advisories and patch information. Affected products include: Python Black.