CVE-2026-115878 is a deserialization-of-untrusted-data (CWE-502) / arbitrary-code-execution flaw in stanza 1.14.0's lemmatizer. Since 1.14.0 the lemmatizer stores its pos_dict in the checkpoint's dicts field as a gzip-compressed pickle. The outer torch.load(..., weights_only=True) allowlist treats that value as an opaque bytes primitive and passes it through unchanged, so it never inspects the inner pickle stream. Trainer.load (stanza/models/lemma/trainer.py) then hands those bytes to _unpack_pos_dict, which contains the only bare pickle.loads in the tree. A crafted checkpoint whose payload __reduce__ returns (os.system, (cmd,)) therefore runs the command at load time, i.e. at pipeline construction before any inference. Reachability is via the documented API: stanza.Pipeline(lang=..., processors="tokenize,pos,lemma", lemma_model_path=<attacker-influenced .pt>) -> LemmaProcessor._set_up_model -> Trainer(model_file=...) -> Trainer.load -> _unpack_pos_dict. No checksum protects caller-supplied paths.
The patch (commit b21e1c9b47b4fccff21d3b0a6c0687a19410c2f0 / PR #1649) fixes this by replacing the inner pickle.loads with orjson.loads (JSON), introducing a v3 dict format, and adding a guard in load that rejects the old pickle-based v2 format with a ValueError. The functions the patch modified that map to the vulnerable path are: _unpack_pos_dict (the unrestricted unpickler - the root cause), Trainer.load (the caller that fed untrusted bytes with no validation and now carries the mitigation), and _pack_pos_dict (the write-side serializer that produced the insecure pickle blob). For a runtime profiler, _unpack_pos_dict is a module-level function so it appears as _unpack_pos_dict, and Trainer.load is a method so it appears as Trainer.load; both are the frames visible when the malicious pickle is deserialized. Note this is distinct from the weights_only=False fallback issue (CVE-2026-54499): the outer load stays safe and the exposure is entirely the inner pickle.