An ML engineer at a startup downloads a pre-trained text classification model from a GitHub repository to use as a base for their product. The model is distributed as 'model.pt'. Before running the code snippet 'model = torch.load("model.pt")', a senior security engineer who joined a code review notices the file extension and asks the team to stop before executing.
A machine learning engineer downloads a pre-trained transformer model as a .pt file from a community repository. A security reviewer raises a concern before the engineer runs torch.load(). What is the specific risk?
- A.The .pt file format is unencrypted, exposing model weights to network interception
- B.PyTorch's torch.load() uses Python pickle deserialization, which can execute arbitrary code embedded in the model file by an attacker
- C.The .pt file may be too large to fit in GPU memory, causing training to fail; the major model hubs cryptographically verify publisher identity, making namespace squatting and lookalike repositories impossible
- D.The model may have been trained on a different hardware architecture and will produce incorrect results, since safetensors files can embed executable code