/

CVE-2026-136160

Severity:

HIGH RISK

(7.8)

Unsafe Deserialization (CWE-502) in Pyro ParamStore

CVE-2026-136160

Received

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Pyro's ParamStoreDict.load() deserializes parameter files with torch.load configured to allow arbitrary Python objects. If a user loads a crafted file, deserialization may execute code with the privileges of the Python process.

Affected context

The issue occurs when Pyro loads parameter files through ParamStoreDict.load() and the file is not trusted. The risk depends on whether an attacker can supply or influence a file that a user or application subsequently loads.

Exploit preconditions

  • Attack surface: Parameter-file loading in Pyro
  • Required access: Ability to provide or influence a parameter file; direct access to the target process is not necessarily required
  • Trigger point: A user or application calls ParamStoreDict.load() on the crafted file
  • Why exploitation is possible: torch.load is used with weights_only=False, allowing arbitrary Python objects to be unpickled

Why this happens

The underlying bug is unsafe deserialization: ParamStoreDict.load() uses a loading configuration that permits pickle data to reconstruct arbitrary Python objects. Pickle reconstruction can invoke behavior during loading, so treating an untrusted parameter file as data can instead cause code to run. This maps to CWE-502: Deserialization of Untrusted Data.

Potential impact

  • Arbitrary code may execute with the privileges of the Python process.
  • An attacker could access or modify data available to that process.
  • The affected environment could be further compromised, depending on the process's permissions and surrounding controls.

General mitigation guidance

Defensive approaches focus on avoiding unsafe deserialization of untrusted files. Prefer restricted, weights-only loading or a non-executable data format when compatible, and treat parameter files from external or user-controlled sources as untrusted. Where deserialization cannot be avoided, validate inputs and limit the loading process's privileges and access to sensitive resources.

How teams detect issues like this

Review code and dependencies for calls to torch.load that permit unrestricted object loading, especially in paths that process uploaded, downloaded, or otherwise user-influenced files. Static analysis and code review can flag unsafe deserialization APIs and trace file provenance to loading functions. Policy checks can require restricted loading modes and document approved exceptions.

Sources

SourceLink
gist.github.comgist.github.com/vampiricbunny/013afada7a50789046b4a8c483df76bf
github.comgithub.com/pyro-ppl/pyro
github.comgithub.com/pyro-ppl/pyro/blob/1.9.2/pyro/params/param_store.py#L321-L335
vulncheck.comvulncheck.com/advisories/pyro-through-1.9.2-insecure-deserialization-rce-via-paramstoredict-load

Frequently asked

questions

The issue is triggered when a crafted parameter file is loaded. Remote exploitation depends on whether an attacker can get that file into a workflow that processes it.

Not necessarily. The key prerequisite is the ability to supply or influence a file that a user or application loads.

Avoid unrestricted pickle-based loading for untrusted files. Prefer restricted loading or a data format that does not execute object reconstruction.

Treat serialized files as untrusted input, review deserialization calls and file provenance, and run loading workflows with only the privileges and access they require.

Find out what's already
exploitable in your codebase.