Skip to main content
Vulnerability Database/CVE-2026-108947

CVE-2026-108947: torchdistill Deserialization Vulnerability

CVE-2026-108947 is a deserialization flaw in yoshitomo-matsubara torchdistill affecting the load_ckpt function. Attackers can exploit this locally through the src_ckpt argument. This article covers technical details, affected versions up to 1.1.5, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-108947 Overview

CVE-2026-108947 is an insecure deserialization vulnerability in yoshitomo-matsubara torchdistill through version 1.1.5. The flaw resides in the load_ckpt function defined in torchdistill/common/main_util.py. Attackers who can manipulate the src_ckpt argument can trigger unsafe deserialization during checkpoint loading. The attack requires local access and low privileges. The project maintainer has classified the report as a duplicate of a prior internally generated finding and has accepted the risk for the project.

Critical Impact

Local attackers supplying a crafted checkpoint file to load_ckpt can trigger deserialization leading to limited confidentiality, integrity, and availability impact on the host process.

Affected Products

  • yoshitomo-matsubara torchdistill versions up to and including 1.1.5
  • The torchdistill/common/main_util.py module containing load_ckpt
  • Downstream Python environments that load untrusted checkpoint files via torchdistill

Discovery Timeline

  • 2026-10-13 - CVE-2026-108947 published to the National Vulnerability Database (NVD)
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-108947

Vulnerability Analysis

The vulnerability is classified under [CWE-20] Improper Input Validation and stems from unsafe deserialization behavior in the load_ckpt function. The function accepts a src_ckpt argument that controls which checkpoint file is loaded. When torchdistill processes this input, it invokes a deserialization routine without first validating that the file originates from a trusted source. Python machine-learning tooling commonly relies on torch.load, which in turn uses pickle semantics to reconstruct arbitrary Python objects. Deserializing attacker-controlled data can therefore execute embedded object constructors defined by the attacker.

Root Cause

The root cause is the absence of input validation on the src_ckpt path and the trust placed in the resulting checkpoint contents. torchdistill treats any file path passed to load_ckpt as a legitimate model checkpoint. The underlying deserializer reconstructs Python objects as declared in the file, including objects whose constructors perform side effects. Because validation is not performed before the deserialization call, a malicious checkpoint is handled identically to a benign one.

Attack Vector

Exploitation requires local access and low-privilege execution context, consistent with the published vector. An attacker places a crafted checkpoint file in a location where torchdistill will load it, or convinces a local user or automated pipeline to pass that path as src_ckpt. When the function deserializes the file, the embedded payload runs within the Python process. The maintainer has acknowledged the report but closed it as a duplicate, indicating no upstream patch is planned. For technical references, see VulDB CVE-2026-108947 and GitHub Issue #550: TorchDistill.

// No verified exploit code is published. See the external references for details.

Detection Methods for CVE-2026-108947

Indicators of Compromise

  • Checkpoint files (.pt, .pth, .ckpt) appearing in training or inference directories from unexpected sources or users
  • Python processes spawning child processes such as /bin/sh, bash, python, or curl shortly after load_ckpt is invoked
  • Outbound network connections initiated by Python workers that normally run offline during model loading

Detection Strategies

  • Instrument the torchdistill environment to log every call to load_ckpt with the resolved src_ckpt path and invoking user
  • Hash and inventory all checkpoint files, and alert when a checkpoint executed by a training job does not match a known-good hash
  • Review Python audit hook events (sys.addaudithook) for pickle.find_class and os.system calls originating from the ML runtime

Monitoring Recommendations

  • Monitor file-system writes to directories referenced by src_ckpt arguments and alert on writes from unauthorized accounts
  • Track process-lineage telemetry for ML worker processes to flag unexpected child processes after checkpoint load events
  • Collect and centralize Python runtime logs in a security data lake to correlate checkpoint loads with downstream system activity

How to Mitigate CVE-2026-108947

Immediate Actions Required

  • Restrict the src_ckpt argument to checkpoints produced and signed by trusted internal pipelines
  • Enforce file-system permissions so only authorized users can write to directories consumed by torchdistill
  • Run torchdistill workloads under dedicated low-privilege service accounts and within isolated containers or sandboxes

Patch Information

The project maintainer has closed the upstream report as a duplicate of a previously accepted internal finding. No security patch is scheduled at the time of publication. Operators of torchdistill 1.1.5 and earlier should treat the project as unpatched for this issue and apply compensating controls. Refer to the maintainer response in the GitHub Comment on Issue #550 for context.

Workarounds

  • Validate checkpoint provenance by verifying cryptographic signatures or hashes before passing a path to load_ckpt
  • Load checkpoints inside a restricted sandbox such as a container with no network egress and read-only mounts for sensitive paths
  • Replace unsafe deserialization paths with safer loaders where possible, for example loading tensors with weights_only=True on supported PyTorch versions
bash
# Configuration example: verify checkpoint hash before invoking torchdistill
sha256sum --check trusted_checkpoints.sha256 && \
  python train.py --src_ckpt /opt/models/verified/model.pth

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.