/

CVE-2026-90777

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in ESPnet Checkpoints

CVE-2026-90777

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

ESPnet uses torch.load with weights_only=False to deserialize pretrained model checkpoints, allowing serialized content to instantiate arbitrary objects during loading. An attacker who supplies a malicious checkpoint file may execute code when the file is processed through an initialization or fine-tuning workflow.

Affected context

The vulnerability occurs in ESPnet workflows that load pretrained model checkpoints through PyTorch deserialization with unrestricted object loading enabled. Risk depends on whether an attacker can introduce or influence a checkpoint file that is later consumed during model initialization or fine-tuning.

Exploit preconditions

  • Attack surface: Model checkpoint loading in ESPnet initialization or fine-tuning workflows
  • Required access: Ability to supply, replace, or cause the application to consume a checkpoint file
  • Trigger point: Invocation of torch.load while processing the checkpoint
  • Why exploitation is possible: Deserialization permits arbitrary object reconstruction, which can execute attacker-controlled code before normal model processing completes

Why this happens

The underlying flaw is the use of unrestricted PyTorch serialization for attacker-influenced checkpoint data. Setting weights_only=False allows more than tensor weights to be reconstructed, treating serialized object behavior as trusted input. This maps to CWE-502: Unsafe Deserialization, where untrusted serialized data can trigger unintended code execution during parsing or object creation.

Potential impact

  • Arbitrary code execution in the ESPnet process
  • Compromise of the host, container, or training environment
  • Theft or modification of datasets, credentials, and model artifacts
  • Model tampering or training-pipeline disruption
  • Potential lateral movement using the privileges of the affected process

General mitigation guidance

Mitigation generally focuses on reducing trust in checkpoint files and restricting deserialization behavior.

Common defensive patterns include:

  • Loading weights through restricted or weights-only APIs where supported
  • Accepting checkpoints only from authenticated and integrity-verified sources
  • Separating model artifact acquisition from privileged training environments
  • Validating file type, provenance, and expected tensor structure before loading
  • Running training and fine-tuning jobs with least privilege and limited network access
  • Avoiding automatic processing of untrusted model artifacts
  • Treating downloaded checkpoints as executable-risk inputs rather than ordinary data

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis rules for torch.load calls that enable unrestricted object loading
  • Code review checks for checkpoint paths influenced by users, downloads, or external repositories
  • Dependency and policy scans that flag unsafe serialization APIs
  • Runtime monitoring for unexpected child processes, filesystem changes, or outbound connections during model loading
  • CI enforcement requiring provenance and integrity verification for model artifacts

Automated code review and software composition analysis tools may help surface unsafe deserialization patterns before deployment.

Sources

SourceLink
github.comgithub.com/espnet/espnet
github.comgithub.com/espnet/espnet/blob/v.202511/espnet2/torch_utils/load_pretrained_model.py#L99
github.comgithub.com/espnet/espnet/commit/91ca045fc179f29bc7b7fe05cd852aea65310003
github.comgithub.com/espnet/espnet/releases/tag/v.202609
github.comgithub.com/espnet/espnet/security/advisories/GHSA-64f6-3gqc-r926
vulncheck.comvulncheck.com/advisories/espnet-before-202609-remote-code-execution-via-unsafe-deserialization

Frequently asked

questions

Exploitation depends on the deployment workflow. It may be remotely enabled when ESPnet retrieves or accepts attacker-controlled checkpoints, but the vulnerable load operation runs wherever the checkpoint is processed.

Not necessarily. The attacker needs a path to influence the checkpoint file or its source; authentication requirements depend on repository permissions, artifact pipelines, and application access controls.

Use restricted weight-loading behavior for untrusted checkpoints, verify artifact provenance and integrity, and avoid deserializing arbitrary objects.

Treat model files as potentially executable inputs, enforce trusted-artifact policies, scan serialization APIs during review, and run model-processing jobs with minimal privileges.

Find out what's already
exploitable in your codebase.