CVE-2026-31222: Snorkel insecure deserialization in Trainer.load

CVE-2026-31222 · Severity: high · CVSS 8.8 · Published 2026-05-12

Snorkel is a library used by data scientists to programmatically build and manage training datasets for machine learning. A security flaw in how it loads saved models allows an attacker to execute malicious code on a user's computer. This occurs if a user is tricked into loading a specially crafted model file, potentially leading to a full system compromise or data theft.

Technologies: snorkel (PyPI), Snorkel. Vendors: PyPI, Snorkel.

Quick answers

Is CVE-2026-31222 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31222 being exploited in the wild.
How severe is CVE-2026-31222?
High severity, with a CVSS score of 8.8, published 12 May 2026.
Which products and versions are affected?
snorkel (PyPI) ECOSYSTEM:introduced=0,last_affected=0.10.0.
Is there a fix for CVE-2026-31222?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-31222 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-31222?
Check whether you run snorkel (PyPI) or Snorkel at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The Snorkel library (up to v0.10.0) contains an insecure deserialization vulnerability (CWE-502) within the Trainer.load() method. The root cause is the use of the torch.load() function without the 'weights_only=True' security parameter enabled. Because torch.load() uses the Python pickle module by default, it can be coerced into instantiating arbitrary Python objects. An attacker can exploit this by providing a maliciously crafted model checkpoint file; when a user or automated system attempts to load this file via the vulnerable method, it results in arbitrary code execution. As of the advisory date, no patched version has been identified.

Affected products

  • Snorkel Team snorkel <= 0.10.0

Identifiers

  • CVE-2026-31222
  • GHSA-78cp-f66x-qmh5
  • PYSEC-2026-3068

Timeline

  • 2026-05-12: disclosed: CVE-2026-31222 published
  • 2026-05-12: advisory: GitHub Advisory GHSA-78cp-f66x-qmh5 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.