Skip to main content
VulnerabilityPublished Updated

CVE-2026-31900: Black is the uncompromising Python code formatter

Affects blackSource GCVE Database

0
Compare
Authoritative record:CVE-2026-31900· High 8.7

Not known to be exploited · CVSS 8.7 High.

Data as of 24 Nov 2026, 21:15 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.

Contested

Critical score, yet low EPSS after six months
EPSS
0.5% chance of exploitation in 30 days – higher than 44% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 11 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu 26.10blackpkg:deb/ubuntu/black?arch=source&distro=stonkingOther threatsAffected
  • =26.3.1-1
  • =26.5.1-1
Fixed in–
Ubuntu 26.04 LTSblackpkg:deb/ubuntu/black?arch=source&distro=resoluteOther threatsAffected
  • 25.1.0-3 – 26.3.1-1
7 affected builds
Fixed in–
Ubuntu 25.10blackpkg:deb/ubuntu/black?arch=source&distro=questingOther threatsAffected
  • =25.1.0-2
  • =25.1.0-3
Fixed in–
Ubuntu 24.04 LTSblackpkg:deb/ubuntu/black?arch=source&distro=nobleOther threatsAffected
  • 23.7.0-1 – 24.2.0-1ubuntu1
4 affected builds
Fixed in–
Ubuntu 22.04 LTSblackpkg:deb/ubuntu/black?arch=source&distro=jammyOther threatsAffected
  • 20.8b1-4 – 21.12b0-1
4 affected builds
Fixed in–
Ubuntu 20.04 LTSblackpkg:deb/ubuntu/black?arch=source&distro=focalOther threatsAffected
  • =19.3b0-1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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.

References

Community reviews

Loading reviews…