Scanner flags pickle risks in MessagePack model weights
The open-source msgpack_weights_scan.py tool from the keras-model-scan kit inspects MessagePack model-weight files without unpacking them. It flags msgpack-numpy object arrays that trigger pickle.loads on load and validates Flax array payloads. A fix in msgpack-numpy (PR #58) has stayed open since May 29, 2026.
- msgpack-numpy stores object arrays as pickles and calls pickle.loads during unpacking
- Flax writes arrays as a (shape, dtype, buffer) triple and never unpickles
- The scanner uses only the Python standard library and exits 1 on any high finding
- PR #58 refusing pickled object arrays has been open since May 29, 2026 without review
Read next
Security