Case study · AI model security · GenAI supply chain

The package you named is clean.
The one it pulls is not.

Eight pyannote speaker-diarization models, 34 million downloads between them, declare a single clean dependency. One hop below it sits lightning 2.6.5, a HIGH-severity remote code execution reachable through a checkpoint file. No manifest mentions it. CyberXYZ found it by reading the whole install.

Vulnerable by inheritance · case study

One clean line in a manifest,
and the RCE it never mentioned.

Speaker diarization is the unglamorous layer under call transcription, meeting notes and compliance recording: who spoke, and when. pyannote's models are the default choice, pulled millions of times a month, and they ask for exactly one Python package. That package is clean. This is the story of what it brings with it.

8models affected
34Mcombined downloads
1 hopbelow the manifest
7.8CVSS · HIGH
  1. Jun 30, 2026

    A clean release

    pyannote-audio 4.0.7 ships. Its dependency list is short and ordinary, and one line in it reads lightning>=2.4: a floor, and no ceiling. Every pyannote model on HuggingFace declares pyannote-audio as its loader and nothing else. Run the package through CyberXYZ on its own and it comes back with zero signals. It is, genuinely, clean.

  2. Jul 15, 2026

    The turn: a checkpoint that runs code

    GitHub publishes GHSA-qqmf-gpg7-g8gw (CVE-2026-58659, CVSS 7.8, HIGH). PyTorch Lightning's _load_state imports and executes whatever module name a checkpoint's _instantiator hyperparameter points at. A crafted checkpoint file, the very artifact people download and share to use these models, becomes arbitrary code execution on load. Every released version through 2.6.5, the current one, is affected. The fix exists as a commit; no fixed release has shipped.

  3. Same day

    What a manifest scanner sees

    Nothing. The models never name lightning. Their one declared dependency has no advisory against it. A tool that reads requirements files, and stops there, reports eight clean models. That is not a bug in those tools; it is the boundary of what a manifest can tell you.

  4. Attacker

    A checkpoint is the payload

    Picture a call-center analytics team. Their transcription pipeline pulls a pyannote model, and a colleague shares a fine-tuned checkpoint that "works better on our accents". Checkpoints are just files; people trade them. An attacker who plants one, on a model hub, in a shared drive, in a pull request, sets its _instantiator hyperparameter to a module they control. The next time anyone loads it through the pipeline, lightning imports and executes that module. No exploit kit, no network trick: a file the victim wanted, opened by code they trusted, through a package they never knew they had.

  5. Every hour

    The catch · the closure fires

    CyberXYZ resolves each model to the whole install, not the manifest: what pip install pyannote-audio actually puts on the machine, at the versions that resolve today. The path is short:

    pyannote/speaker-diarization-3.1 → pyannote-audio 4.0.7 → lightning 2.6.5

    Depth one. Required, not optional. The floor >=2.4 admits 2.6.5, the advisory range covers 2.6.5, and nothing pins it lower. The finding is version-confirmed: not "this package has had a CVE once", but "the version a fresh install lands on today is the vulnerable one."

  6. T+0

    Eight models change colour

    On the AI Models surface every pyannote model that rated CLEAN on its declared surface now rates HIGH, with the reason recorded: one confirmed finding in the transitive closure. The prediction layer files them under a single attack vector, vulnerable by inheritance, at 7.0 out of 10. The declared-only rating is kept beside the new one, so the change is visible, not silent.

  7. Mapping

    MITRE ATLAS and ATT&CK

    This is an AI supply-chain technique first: ATLAS AML.T0010.003 (ML Supply Chain Compromise: Model) delivers the poisoned checkpoint, and AML.T0011.000 (User Execution: Unsafe ML Artifacts) is the moment it runs. The path into the machine is a classic software dependency: ATT&CK T1195.001 (Compromise Software Dependencies), executed through T1204.002 (User Execution: Malicious File) and T1059.006 (Python). The weakness class is CWE-470, unsafe reflection.

  8. At install

    The verdict · alert

    Ask the firewall about lightning@2.6.5 directly and it answers alert: the HIGH advisory matched on the resolved version, XYZ score 4.2. Not a block. A HIGH advisory with no public exploit and a local attack vector is a warning, and the platform says so rather than inflating it. The card below is that answer, unedited.

  9. Today

    The aftermath, and what to do

    There is no lightning release to upgrade to yet. Until there is: treat checkpoint files from anywhere you do not control as untrusted input, load them only in an isolated environment, and watch the upstream fix. Package maintainers can add a ceiling to a floor-only pin. And read the whole install, because the exposure that matters most is usually the one nobody wrote down.

Caught below the manifest

Not an advisory someone forwards.
The verdict.

app.cyberxyz.io/dashboard/ai-models · pyannote/speaker-diarization-3.1 · reachability
transitive finding · depth 1Sep 7, 2026 · hourly recompute

Alert: lightning@2.6.5 reached from pyannote/speaker-diarization-3.1 via pyannote-audio

0/10
XYZ SCORE high · verdict alert
SIGNALS
BLAST RADIUS0 models · 0M combined downloads
speaker-diarization-3.1 · 9.1Mwespeaker-voxceleb-resnet34-LM · 6.3Msegmentation-3.0 · 5.8M+5 more
STATEMENTEcosystem PyPI · decision alert (confidence 0.5) · GHSA-qqmf-gpg7-g8gw / CVE-2026-58659 matches the resolved version 2.6.5 · pin lightning>=2.4 admits it · no fixed release published
SIGNALS · 3 of 3 fired
01Live Threat Intel · advisory matchHIGH

GHSA-qqmf-gpg7-g8gw · CWE-470 unsafe reflection · CVSS 7.8 · version-confirmed on 2.6.5 · EPSS 0.3%.

02Dependency Injection · new runtime depMEDIUM

lightning 2.6.5 introduces PyYAML <8.0,>5.4, not seen in a prior version.

03Dependency Injection · new runtime depMEDIUM

lightning 2.6.5 introduces tensorboardX <3.0,>=2.6, not seen in a prior version.

PACKAGE CONTEXT
version 2.6.5 · published May 27, 2026 · reached via pyannote-audio 4.0.7 at depth 1 on the required path · source github.com/Lightning-AI/pytorch-lightning
PACKAGE lightningVERSION 2.6.5ECOSYSTEM PyPIDECISION ALERT

fig. 01 · the platform's verdict for the reached package · XYZ 4.2, three signals, decision alert

Indicators and mapping

What to look for,
and where it sits on the matrices.

indicators · observed, not projected
package
lightning ≤ 2.6.5 · every released version · no fixed release as of Sep 7, 2026
advisory
GHSA-qqmf-gpg7-g8gw · CVE-2026-58659 · CVSS 7.8 · CWE-470 unsafe reflection
sink
lightning._load_state imports the module named in a checkpoint's _instantiator hyperparameter
carrier
any .ckpt or .pt checkpoint whose hyperparameters carry a module path outside Lightning's own
path
pyannote model → pyannote-audio 4.0.7 (pin lightning>=2.4) → lightning 2.6.5 · depth 1 · required
models
speaker-diarization-3.1 · wespeaker-voxceleb-resnet34-LM · segmentation-3.0 · speaker-diarization-community-1 · segmentation · voice-activity-detection · embedding · speaker-diarization
detect
a resolved lightning at any 2.x where third-party checkpoints are loaded · an _instantiator value outside lightning.* or pytorch_lightning.*
mapping
ATLAS AML.T0010.003 · ML Supply Chain Compromise: Model ATLAS AML.T0011.000 · User Execution: Unsafe ML Artifacts ATT&CK T1195.001 · Compromise Software Dependencies ATT&CK T1204.002 · User Execution: Malicious File ATT&CK T1059.006 · Python CWE-470 · Unsafe Reflection

fig. 02 · indicators from the advisory, the registry and our fact table · no hashes or hosts: none were observed in an attack

Sources: GitHub Security Advisory GHSA-qqmf-gpg7-g8gw (published Jul 15, 2026), NVD CVE-2026-58659, PyPI release metadata for pyannote-audio 4.0.7 and lightning 2.6.5, and the CyberXYZ AI-models fact table as of Sep 7, 2026. Figures reflect the platform's output for the versions named; they are not projections.

See the whole install, not the manifest → How the platform reads a dependency tree