CVE-2026-31900
CVE-2026-31900 is a critical-severity vulnerability in Python Black with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-20.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v4: 8.7
- EPSS exploit prediction: 0% (37th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-11315
- Weakness: CWE-20
- Affected product: Python Black
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2026-31900?
- 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.
- How severe is CVE-2026-31900?
- CVE-2026-31900 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2026-31900 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (37th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-31900?
- CVE-2026-31900 affects Python Black. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-31900?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2026-31900 have an EU (EUVD) identifier?
- Yes. CVE-2026-31900 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-11315.
- When was CVE-2026-31900 published?
- CVE-2026-31900 was published on 2026-03-11 and last updated on 2026-06-17.
References
- https://github.com/psf/black/commit/0a2560b981364dde4c8cf8ce9d164c40669a8611
- https://github.com/psf/black/security/advisories/GHSA-v53h-f6m7-xcgm
Affected products (1)
- cpe:2.3:a:python:black:*:*:*:*:*:*:*:*
More vulnerabilities in Python Black
- CVE-2026-32274 — High (CVSS 7.5): Black is the uncompromising Python code formatter. Prior to 26.3.1, Black writes a cache file, the name of which is…
All CVEs affecting Python Black →
Other CWE-20 (Improper Input Validation) vulnerabilities
- CVE-2026-48316 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48281 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48277 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48055 — Critical (CVSS 10.0): Streambert is a cross-platform Electron Desktop App to stream and download any video media. In versions 2.4.0 and…
- CVE-2026-34910 — Critical (CVSS 10.0): A malicious actor with access to the network could exploit an Improper Input Validation vulnerability found in UniFi OS…
- CVE-2026-33587 — Critical (CVSS 10.0): Lack of user input sanitisation in Open Notebook v1.8.3 allows the application user to execute Python code (and…
Browse all CWE-20 (Improper Input Validation) vulnerabilities →