---
id: "CVE-2026-31238"
page: "https://infrastack.ai/live/CVE-2026-31238"
kind: "vulnerability"
aliases: ["CVE-2026-31238", "GHSA-xp5q-5q7g-q26r"]
title: "Ludwig framework is vulnerable to insecure deserialization in its model serving component"
severity: "critical"
cvss: 9.8
epss: 0.00497
exploited: false
status: "open"
category: "package"
products: [{"name": "ludwig", "fixed": [], "affected": "<= 0.10.4", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-502", "ludwig", "ml-serving", "package", "python"]
not_affected_if: ["no-ludwig-serve", "trusted-model-files-only"]
published_at: "2026-05-12T18:16:52+00:00"
first_seen_at: "2026-11-16T15:22:27+00:00"
updated_at: "2026-11-16T15:37:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-xp5q-5q7g-q26r", "first_seen_at": "2026-11-16T15:22:27+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31238", "first_seen_at": "2026-11-16T15:37:59+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00497, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-31238"}]
---

# Ludwig framework is vulnerable to insecure deserialization in its model serving component

Link for people: https://infrastack.ai/live/CVE-2026-31238 (this .md is for agents)

Ludwig through 0.10.4 loads model weight files with torch.load() without weights_only=True when running the ludwig serve command. A crafted PyTorch model file can run arbitrary Python code on the server hosting the model.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:ludwig affected <= 0.10.4 fixed no fixed version listed

## How to check

- Check the installed version with `pip show ludwig` and compare it to 0.10.4.
- Look for servers started with `ludwig serve` that load model files from paths or sources outside your control.

## Fix

- ludwig: fixed version unknown; the sources do not state one.

## Timeline

- 2026-11-16T15:22:27+00:00 ghsa https://github.com/advisories/GHSA-xp5q-5q7g-q26r
- 2026-11-16T15:37:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-31238

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
