/

CVE-2026-73325

Severity:

HIGH RISK

(7.8)

Unsafe Deserialization (CWE-502) in OneCompression

CVE-2026-73325

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.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

Fujitsu Research's OneCompression library unsafely deserializes PyTorch checkpoint files when loading quantized models. If an attacker can place or cause the library to load a crafted model.pt file from a selected model directory, arbitrary Python code may execute with the library process's privileges.

Affected context

The vulnerability affects OneCompression deployments that use QuantizedModelLoader.load_quantized_model_pt() to load a checkpoint from a caller-selected model directory. Risk arises when the selected model.pt file is not fully trusted and the loader invokes PyTorch deserialization with pickle-enabled behavior, as occurs in library versions before 1.2.1.

Exploit preconditions

  • Attack surface: Model checkpoint loading through the OneCompression quantized model loader
  • Required access: Ability to supply, replace, or influence the model.pt file or its containing model directory
  • Trigger point: Invocation of QuantizedModelLoader.load_quantized_model_pt()
  • Why exploitation is possible: The loader unconditionally enables general-purpose PyTorch deserialization, allowing embedded Python object behavior to run during checkpoint loading

Why this happens

The underlying bug is the use of torch.load with weights_only=False for an input checkpoint whose trustworthiness is not enforced. This enables Python pickle machinery to reconstruct arbitrary objects during deserialization, rather than restricting loading to inert tensor data and approved structures. The behavior maps to CWE-502: Deserialization of Untrusted Data, because attacker-controlled serialized content is processed as executable object-construction logic.

Potential impact

  • An attacker may execute arbitrary Python code in the OneCompression process.
  • The process could run system commands with its available operating-system privileges.
  • Sensitive model files, credentials, or environment data could be accessed.
  • The host or workload could be compromised further through post-exploitation activity.
  • Model integrity and downstream inference results could be affected.

General mitigation guidance

Mitigation generally focuses on removing executable deserialization behavior from untrusted model-loading paths.

Common defensive patterns include:

  • Prefer tensor-only or otherwise restricted checkpoint loading modes that do not reconstruct arbitrary Python objects.
  • Treat model files and model directories as untrusted inputs unless their provenance and integrity are verified.
  • Enforce strict model schemas and allowlists for supported checkpoint contents.
  • Use cryptographic integrity and authenticity checks before loading artifacts.
  • Isolate model-loading workloads and apply least-privilege process, filesystem, and network permissions.
  • Avoid allowing callers to select arbitrary model directories without authorization and policy enforcement.
  • Keep model artifacts separate from credentials and other sensitive runtime resources.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying torch.load calls that enable general pickle deserialization or omit restricted loading controls.
  • Code review checks for model paths derived from callers, uploads, shared storage, or other untrusted sources.
  • Dependency and policy scans that flag unsafe deserialization APIs in machine-learning pipelines.
  • Runtime monitoring for unexpected child processes, system-command execution, filesystem access, or outbound connections during model loading.
  • CI policies requiring artifact provenance, integrity verification, and approved checkpoint formats.
  • Automated review tools can help identify unsafe loader configurations, but findings should be validated against actual trust boundaries.

Sources

SourceLink
github.comgithub.com/FujitsuResearch/OneCompression/blob/main/SECURITY.md
pypi.orgpypi.org/project/onecomp/
pypi.orgpypi.org/project/onecomp/1.2.1/
vulncheck.comvulncheck.com/advisories/fujitsu-onecompression-arbitrary-code-execution-via-torch-load-deserialization

Frequently asked

questions

It can be exploitable through a remote workflow when an attacker can upload, replace, or influence a checkpoint that a service or job later loads. Direct network reachability alone is not sufficient; control over the loaded model artifact is the key condition.

The attacker generally needs the ability to place or alter model.pt, influence the selected model directory, or compromise an upstream artifact repository or storage location trusted by the application.

Use a restricted checkpoint-loading mechanism that accepts only expected tensor data and approved metadata, and verify artifact integrity and provenance before deserialization.

Establish model-artifact trust policies, prohibit general pickle deserialization for untrusted inputs, enforce least privilege for loading processes, and add static, dependency, and CI checks for unsafe loader configurations.

Find out what's already
exploitable in your codebase.