/

CVE-2025-70560

Severity:

HIGH RISK

(8.4)

Unsafe Deserialization in Boltz Molecule Loader

CVE-2025-70560

Modified

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.4)

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

Boltz 2.0.0 uses Python's pickle module to deserialize molecule data files without verifying their safety, allowing embedded code to run during loading.

If an attacker can place a crafted pickle file in a directory processed by Boltz, this can lead to arbitrary code execution under the application's runtime user.

Affected context

This vulnerability appears in environments where Boltz 2.0.0 automatically discovers and loads molecule data files using Python's pickle deserialization.

It is relevant in workflows that:

  • Treat molecule data files as trusted inputs by default
  • Load files from shared, user-writable, or externally synchronized directories
  • Do not apply prior validation, content-type checks, or sandboxing to molecule data

Exploit preconditions

  • Attack surface: File-based input to the Boltz molecule loading functionality
  • Required access: Ability to create, modify, or drop files in directories that Boltz scans and loads as molecule data
  • Trigger point: Automatic or manual loading of a malicious pickle file by the molecule loader
  • Why exploitation is possible: Python pickle is inherently capable of instantiating arbitrary objects and executing code during deserialization, and the implementation assumes all molecule files are trustworthy without enforcing format restrictions or safety checks

Why this happens

The core issue is reliance on Python's pickle module to deserialize molecule data files that may be influenced by untrusted parties.

Pickle is a general-purpose object serialization mechanism that can encode arbitrary Python object graphs, including constructors that execute code when unpickled.

By directly calling pickle load functions on file contents without constraining the allowed object types or validating the source, the molecule loader embodies CWE-502: Deserialization of Untrusted Data—it treats serialized data as if it were benign state instead of potentially executable behavior.

Potential impact

  • Arbitrary code execution with the privileges of the Boltz process
  • Installation of backdoors or persistent malware on the host system
  • Unauthorized access to sensitive data processed or stored by Boltz
  • Tampering with scientific calculations or molecule datasets, leading to corrupt analysis results
  • Use of the compromised host as a pivot point for lateral movement within the environment

General mitigation guidance

Effective mitigation focuses on avoiding general-purpose unsafe deserialization and narrowing trust boundaries for data files:

  • Replace Python pickle with a safer, data-only serialization format (e.g., JSON, YAML with safe loaders, or domain-specific formats) for molecule representations.
  • Introduce a strict schema or model definition for molecule data and validate inputs against it before use.
  • Treat all file-based inputs as untrusted by default and restrict the directories from which Boltz will load data to locations not writable by untrusted users.
  • Run Boltz with least privilege, avoiding elevated or shared service accounts, and consider OS-level containment (containers, sandboxes) to limit blast radius.
  • Implement integrity controls such as signing or checksums for trusted molecule datasets so that only authenticated data is accepted.

How teams detect issues like this

Organizations can detect and manage this class of issue through a combination of code- and behavior-focused strategies:

  • Static analysis rules that flag uses of Python's pickle.load/pickle.loads on data not clearly originating from immutable, internal-only sources.
  • Code review checklists that require justification and documentation whenever pickle is used, with a preference for data-only formats.
  • Runtime monitoring for unusual process behavior or child process creation when Boltz loads molecule files, indicating potential exploitation.
  • File integrity monitoring on directories used as inputs to Boltz, watching for unexpected or unapproved file creation.
  • Incorporating automated security scanning into CI/CD pipelines to detect unsafe deserialization patterns and enforce internal secure coding policies.

Sources

SourceLink
github.comgithub.com/advisories/GHSA-fjm6-8xp2-4fwc
github.comgithub.com/jwohlwend/boltz/blob/cb04aeccdd480fd4db707f0bbafde538397fa2ac/src/boltz/data/mol.py#L80
github.comgithub.com/jwohlwend/boltz/issues/600

Frequently asked

questions

It can be, depending on how Boltz is deployed. If an attacker can remotely upload or synchronize files into directories that Boltz reads from—such as through web interfaces, shared network drives, or automated ingestion pipelines—then exploitation can be triggered without direct local access.

The attacker needs the ability to create or modify molecule data files in locations that Boltz will process. This could be local user access on the same system, write access to a shared directory, or access to any upstream system that feeds files into Boltz.

The most robust approach is to stop using pickle for untrusted or semi-trusted data and switch to a data-only serialization format with strict schema validation. In parallel, limit input directories to trusted, non-user-writable locations and ensure Boltz runs with minimal privileges.

Establish a development guideline that forbids generic object deserialization mechanisms like pickle for external data, mandate schema-based validation for all file inputs, and integrate automated checks in code review and CI pipelines to flag unsafe deserialization usage early.

Find out what's already
exploitable in your codebase.