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

