CVE-2026-31900

Black's vulnerable version parsing leads to RCE in GitHub Action

Published Mar 11, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v53h-f6m7-xcgm Black's vulnerable version parsing leads to RCE in GitHub Action
History
Type Values Removed Values Added
First Time appeared Python
Python black
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:python:black:*:*:*:*:*:*:*:*
Vendors & Products Python
Python black
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Psf
Psf black
Vendors & Products Psf
Psf black
Type Values Removed Values Added
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.
Title Black's vulnerable version parsing leads to RCE in GitHub Action
Weaknesses CWE-20
References
Metrics cvssV4_0

{'score': 8.7, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 13, 2026, 3:55 AM
Reserved
Mar 9, 2026, 9:59 PM
Status
Analyzed
Published
Mar 11, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:34 AM