Keras, ONNX, and GGUF model files carry hidden code execution risks beyond pickle
A technical analysis reveals that several machine learning model file formats pose executable code risks that are widely underestimated by developers and security tooling. Keras model files store Lambda layers as marshalled Python code objects that are executed on load, making .keras and .h5 files functionally equivalent to pickle in terms of code-carrying risk. ONNX files, often considered safe due to the absence of embedded bytecode, can expose systems to arbitrary file reads via external tensor path references and may depend on non-standard operators. GGUF files embed Jinja chat templates that can be exploited through known sandbox escapes, meaning static analysis rather than rendering is required for safe inspection. The article details how the AIsbom v1.3.0 scanner addresses these risks by flagging critical issues without executing or unmarshalling any untrusted content.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in