A TensorFlow Lite model is a FlatBuffer of tensors and operators. Built-in operators run TFLite's own kernels. A custom operator runs whatever the application has registered under its name, its custom_code . There is one standard exception: a custom operator whose custom_code starts with Flex belongs to the Flex delegate ("select TF ops"), which builds a full TensorFlow op and runs it inside the interpreter. According to the LiteRT docs, the TensorFlow pip package installs that support automatically.
Flex ops matter for security because they give a small mobile-looking file the whole TensorFlow op set, including ops that read and write files. That part is already public: promptfoo's ModelAudit flags custom ops in .tflite files, and a public proof of concept (Rammadaeus/tflite-flex-bypass-poc) uses Flex file operations.…