Skip to content
OpenAdvisories
High · 8.7 Public exploit CVE-2026-31900 EUVD-2026-11315GHSA-v53h-f6m7-xcgmPYSEC-2026-2120

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

Published Mar 11, 2026 · Updated Mar 13, 2026 · 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.

Affected products

VendorProductAffectedFixed
psf black < 26.3.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 black 26.3.1-1 —
Debian 13 black No fix yet —
Debian 12 black No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 black No fix yet —
Ubuntu 26.04 LTS black No fix yet —
Ubuntu 25.10 black No fix yet —
Ubuntu 24.04 LTS black No fix yet —
Ubuntu 22.04 LTS black No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS black No fix yet —
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-black 25.1.0-160000.3.1 SUSE-SU-2026:20928-1
SLES 16.0 python-black 25.1.0-160000.3.1 SUSE-SU-2026:20928-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-black 26.3.1-1.1 openSUSE-SU-2026:10372-1
openSUSE Leap 16.0 python-black 25.1.0-160000.3.1 openSUSE-SU-2026:20417-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
GitHub Actions psf/black < 26.3.0 26.3.0 GHSA-v53h-f6m7-xcgm
PyPI black < 26.3.0 26.3.0 PYSEC-2026-2120

Advisories 4

References