Skip to content
Honeypot Daily
Tech and security news that matters
How does CVE-2026-114134 enable remote code execution in Black GitHub Action?
Vulnerabilities

How does CVE-2026-114134 enable remote code execution in Black GitHub Action?

A high severity flaw in the Black GitHub Action permits untrusted code execution when the use_pyproject setting is enabled.

Key points

  • CVE-2026-114134 affects Black versions prior to 26.10.1.
  • The flaw allows remote code execution via the GitHub Action.
  • Patched version 26.10.1 is available for immediate update.

The short version

  • The Black GitHub Action fails to validate version strings from pyproject.toml.
  • Attackers can inject malicious repository references via pull requests.
  • Only repositories using use_pyproject: true are exposed to this risk.

The details

A high severity vulnerability, tracked as CVE-2026-114134, exists in the GitHub Action bundled with the Black Python formatter. According to GitHub advisory GHSA-cg8m-r9f2-5wm2, the flaw impacts users who configure the action with the `use_pyproject` setting set to True. This configuration allows the action to read the required version from the `tool.black.required-version` field in a project’s `pyproject.toml` file. The action installs this version without performing any validation checks.

An attacker can exploit this by submitting a pull request that modifies the `pyproject.toml` file. By pointing the Black version reference to a malicious repository, the attacker can execute untrusted code within the context of the victim’s repository. This mechanism is similar to the previously disclosed CVE-2026-31900. The vulnerability remains present in all Black versions older than 26.10.1.

The context

The issue arises because the GitHub Action accepts the version value directly from the project configuration file. It treats this input as trusted, allowing the installation of arbitrary packages or versions. This bypasses standard security controls that might otherwise restrict package sources. The flaw specifically targets the integration between Black and GitHub Actions, rather than the core formatter tool itself.

Next steps

Users should update the Black GitHub Action to version 26.10.1 or later. This patched version addresses the lack of validation in the version string handling. Teams should review their workflow configurations to determine if `use_pyproject` is enabled. If immediate updating is not possible, disabling this setting reduces the attack surface until a fix is applied.

What defenders should look for

Security teams should monitor for unusual package installation events during CI/CD pipelines. Look for workflows attempting to install packages from untrusted or newly created repositories. Check logs for successful code execution following a pull request merge that modifies configuration files. Verify that version constraints are being validated before installation. Ensure that workflow permissions are minimally scoped to prevent arbitrary code execution. Investigate any unexpected network connections initiated by build agents.

What to do and how to stay safe: Black

  • Audit GitHub Actions workflows for the use of use_pyproject: true.
  • Update Black to version 26.10.1 to apply the security patch.
  • Review pull requests that modify pyproject.toml for suspicious version references.
  • Monitor CI/CD logs for unauthorized package installations or code execution.

Step-by-step guide: How Virtual Patching Works: The Mechanics Behind Inline Protection

General security guidance from the Honeypot Daily newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

Which versions of Black are vulnerable to CVE-2026-114134?

All versions of Black prior to 26.10.1 are vulnerable to this flaw.

How can an attacker exploit this vulnerability?

By submitting a pull request that edits pyproject.toml to point to a malicious repository.

Is there a fix available for this issue?

Yes, updating to Black version 26.10.1 resolves the vulnerability.

Sources

  1. GitHub Advisory Database

Related stories