v1.2.1
[v1.2.1] 2026-07-03
Security
-
Unsafe deserialization hardening (CWE-502):
QuantizedModelLoader.load_quantized_model_pt()(aliasonecomp.load_quantized_model_pt()) previously calledtorch.load(model.pt, weights_only=False)unconditionally, allowing arbitrary code execution when loading a malicious.ptcheckpoint. It now refuses to load unless the caller explicitly opts in viaallow_unsafe_deserialization=True, and emits a strong warning when it does load. For untrusted models, use the safetensors-basedload_quantized_model(), which does not execute code.- Breaking change: existing callers of
load_quantized_model_pt()must passallow_unsafe_deserialization=Truefor trusted.ptfiles.
- Breaking change: existing callers of
-
Quantizer.load_results()/ResultLoader: same hardening applied. Loading withweights_only=Falsenow requiresallow_unsafe_deserialization=True(added as aResultLoaderfield), and logs a warning. The safeweights_only=Truepath is unchanged. -
Updated docstrings, docs, and the LoRA SFT example to document the risk and the required opt-in.
-
Credit: this unsafe deserialization issue (CWE-502) was responsibly disclosed by Nir Yehoshua, Cipher Security Labs. Thank you for the report.