Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.
https://github.com/unitaryai/detoxify/pull/146
https://github.com/unitaryai/detoxify/issues/145
https://github.com/unitaryai/detoxify/commit/4eb4af915fc47c945a9fcd776c7e8412e5b05a76
https://github.com/unitaryai/detoxify/blob/v0.5.4/detoxify/detoxify.py#L38-L43