CVE-2026-31238: Ludwig insecure deserialization in model serving component

CVE-2026-31238 · Severity: critical · CVSS 9.8 · Published 2026-05-12

Ludwig is an open-source framework used to build and deploy machine learning models. A security vulnerability in its model-serving component allows an attacker to execute malicious code on the server by providing a specially crafted model file. This could lead to a complete takeover of the system hosting the AI models and unauthorized access to sensitive data.

Technologies: Ludwig AI Ludwig. Vendors: Ludwig AI, PyPI.

Quick answers

Is CVE-2026-31238 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31238 being exploited in the wild.
How severe is CVE-2026-31238?
Critical severity, with a CVSS score of 9.8, published 12 May 2026.
Which products and versions are affected?
Ludwig AI Ludwig <= 0.10.4, thru 0.10.4; ludwig (PyPI) ECOSYSTEM:introduced=0,last_affected=0.10.4.
Is there a fix for CVE-2026-31238?
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-31238 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-31238?
Check whether you run Ludwig AI Ludwig or ludwig (PyPI) 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

Ludwig versions up to and including 0.10.4 are vulnerable to insecure deserialization (CWE-502) within the 'ludwig serve' command. The vulnerability exists because the framework utilizes the torch.load() function to load model weights without setting the 'weights_only=True' parameter. This allows the underlying pickle module to deserialize arbitrary Python objects. An attacker who can provide a maliciously crafted PyTorch model file to the server can achieve remote code execution (RCE) with the privileges of the Ludwig process. As of the advisory date, no patched version has been identified.

Affected products

  • ludwig-ai Ludwig <= 0.10.4

Identifiers

  • CVE-2026-31238
  • GHSA-xp5q-5q7g-q26r
  • PYSEC-2026-405

Timeline

  • 2026-05-12: advisory: GHSA-xp5q-5q7g-q26r published
  • 2026-05-12: disclosed: CVE-2026-31238 published to NVD

References

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