Skip to content

Unsafe cloudpickle.load() in sdv/single_table/base.py #2874

@ikerrr33

Description

@ikerrr33

Description

SDV uses cloudpickle as its serialization mechanism when saving and loading models. cloudpickle.load() shares the same underlying deserialization protocol as Python's standard pickle.load(), executing arbitrary Python code when processing untrusted data. An attacker need only craft a malicious .pkl file; when a user calls the API to load it, the payload executes immediately during deserialization with no further interaction required.

Locations

File Line Context
sdv/single_table/base.py 764 cloudpickle.load() in BaseSingleTableSynthesizer.load()

Suggested Fix

  1. Consider using secure formats such as safetensors as an alternative to pickle.
  2. Use digital signatures to verify the integrity of model files.

Impact

An attacker need only craft a malicious .pkl file; when a user calls the API to load it, the payload executes immediately during deserialization with no further interaction required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions