Skip to content

spaCy wheels bundle vulnerable version of black (CVE‑2026‑32274) #13937

@NemoLeerink

Description

@NemoLeerink

black==22.3.0 is bundled inside the spaCy wheel and cannot be upgraded or overridden by downstream projects. There is a CVE affecting black versions prior to the fixed release, specifically CVE‑2026‑32274. Because the vulnerable version is embedded inside the wheel rather than installed as a standalone dependency, consumers cannot mitigate or replace it in their own projects.

Impact

Even though this is not a run‑time vulnerability in typical spaCy usage (the black code is not invoked at runtime unless explicitly imported), it still appears in automated security scans that are standard within enterprise environments. This leads to:

  • Critical vulnerabilities flagged in tools like Nexus/Wiz,
  • Mandatory internal processes for vulnerability handling,
  • No viable remediation path for consuming teams, because the black version is not under their control.

To avoid cascading false‑positive security failures across downstream users, it would be helpful if spaCy could update or remove the bundled version.

Request

Please evaluate what it would take to either:

Upgrade the bundled black version inside the wheel to a non‑vulnerable release (fixed in latest, 26.3.1) ,
or
Remove the vendorized black package from the wheel if it is no longer required.

This would allow enterprise consumers to clear CVE findings and avoid unnecessary exceptions/waivers.

How to reproduce the behaviour

In our environment we use Nexus IQ for scanning, but the issue can be reproduced manually:

  • Install spaCy from PyPI
  • Inspect the installed wheel contents
  • You will see black==22.3.0 bundled inside the wheel, triggering the CVE detection.

Your Environment

Operating System: not relevant (Linux-based, but occurs on all platforms)
Python Version: not relevant (reproduced on 3.8 / 3.9 / 3.10)
spaCy Version: not relevant (affects current master)
Environment: building Docker images on Linux and Windows hosts

Please reach out if anything is unclear. Many many thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions