CVE-2026-137998

Detoxify could execute code while loading an untrusted checkpoint

Unitary AI · Detoxify toxicity-model checkpoint loading

First documented disclosure · Review checkpoint

Summary

A custom model checkpoint could run Python code before the loader checks its expected fields.

Severity and exploitation evidence

High · 8.5/10 · CVSS 4.0. Severity source.

Exploitation not established: The reviewed sources describe a reported weakness or controlled demonstration. They do not establish malicious exploitation or affected victims; no payload or product was executed in this review.

Exploitation evidence source

Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.

How the weakness works

Both local checkpoint and default model-download paths explicitly used torch.load or load_state_dict_from_url with weights_only=False.

Conditions required

A user or moderation pipeline loads a malicious checkpoint. The default download path uses the project’s own release assets; compromise of those assets was not established.

Potential impact

Code execution with the loading process’s existing permissions.

Affected versions and configurations

CNA lists 0.5.3–0.5.4. Reporter additionally describes releases through 0.5.2 as exposed with PyTorch older than 2.6; that conditional older range is not included in the CNA.

Fix and mitigation status

Commit 4eb4af915fc47c945a9fcd776c7e8412e5b05a76 merged November 27 sets weights_only=True on both loads. No fixed packaged release found; the checked release index still ends at 0.5.4.

Practical next steps

Use trusted checkpoints only and adopt the reviewed source correction or a release that contains it. Review PyTorch’s supported security requirements separately.

Operating lesson

A model loader should not disable restricted deserialization merely for compatibility.

Evidence and limits

Original issue 145 is November 26; PR 146 merged November 27. The maintainer acknowledges the load behavior but says untrusted checkpoints are not expected use. Static inspection verified the two restricted-load calls, without loading a model or executing a proof of concept. The issue’s “patched versions: none” predates the merged source fix. Severity is attributed to VulnCheck CNA CVSS 4.0. CNA publication 2026-11-27T16:10:18.129Z is separate from the original disclosure.

Sources