CVE-2026-31238 Ludwig framework is vulnerable to insecure deserialization in its model serving component

Critical 9.8 Published Updated

Attackers can execute arbitrary code by providing malicious model files to the Ludwig model server due to insecure deserialization.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-31238?

CVE-2026-31238 is a critical unsafe deserialization vulnerability in n/a, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-502

Which versions are affected by CVE-2026-31238?

3 open source packages ship an affected version, including ludwig.

PackageAffectedFixed in
ludwig PyPIAll versions to 0.10.4None
ludwig PyPIAll versions to 0.10.4None
ludwig PyPIAll versions to 0.10.4None

How do I fix CVE-2026-31238?

No fix has been published for CVE-2026-31238 yet. Limit exposure of the affected software until one is available.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2026-31238 being exploited?

There is no known exploitation of CVE-2026-31238 in the wild and no public exploit code.

Sources

Also known as GHSA-xp5q-5q7g-q26r, PYSEC-2026-405.

Is CVE-2026-31238 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free