CVE-2026-56315 Overview
CVE-2026-56315 affects picklescan versions before 1.0.4, a security scanner designed to detect malicious Python pickle files commonly used in machine learning model distribution. The scanner fails to block at least seven Python standard library modules, including uuid, _osx_support, _aix_support, _pyrepl.pager, and imaplib. These modules expose eight functions that provide direct arbitrary command execution. Attackers craft malicious pickle files that import these unblocked modules to achieve remote code execution while bypassing picklescan's safety validation entirely.
Critical Impact
Attackers can execute arbitrary commands on systems loading pickle files validated as safe by picklescan, compromising ML pipelines and model-serving infrastructure.
Affected Products
- picklescan versions prior to 1.0.4
- Machine learning pipelines relying on picklescan for pickle file validation
- Model hosting platforms and inference services using picklescan as a security gate
Discovery Timeline
- 2026-06-23 - CVE-2026-56315 published to NVD
- 2026-06-23 - Last updated in NVD database
Technical Details for CVE-2026-56315
Vulnerability Analysis
The vulnerability is an incomplete denylist flaw [CWE-184] in picklescan's blocking logic. The scanner maintains a list of known-dangerous Python modules and functions, blocking pickle files that reference them during deserialization. The list omits at least seven standard library modules that expose functions capable of executing arbitrary system commands.
Python's pickle module reconstructs objects by importing arbitrary modules and invoking their callables during deserialization. When a callable performs command execution as a side effect, deserializing a crafted pickle results in code execution. Because picklescan does not flag the eight exposed functions in modules such as uuid, _osx_support, _aix_support, _pyrepl.pager, and imaplib, malicious pickles pass validation unchallenged.
Root Cause
The root cause is reliance on a denylist approach that does not enumerate every standard library function capable of command execution. Several modules invoke shell utilities through os.popen, subprocess, or equivalent helpers during normal operation. Any pickle that calls these functions with attacker-controlled arguments executes commands on the host loading the file.
Attack Vector
An attacker publishes a malicious model file or pickle artifact to a repository, model hub, or shared storage location. A victim downloads the file and runs picklescan to verify safety. The scanner returns a clean result because the referenced modules are not on the block list. When the victim then loads the pickle with pickle.load or torch.load, the embedded reducer invokes one of the unblocked functions and executes attacker-supplied commands with the privileges of the loading process.
The vulnerability is exploitable over the network without authentication or user interaction beyond loading the file. Full technical details are available in the GitHub Security Advisory and the VulnCheck Advisory on Picklescan.
Detection Methods for CVE-2026-56315
Indicators of Compromise
- Pickle or model files containing GLOBAL opcodes referencing uuid, _osx_support, _aix_support, _pyrepl.pager, or imaplib
- Unexpected child processes (shells, sh, cmd.exe, curl, wget) spawned from Python interpreters loading model files
- Outbound network connections from ML inference or training workloads to unfamiliar destinations immediately after model load
- picklescan version output reporting a release earlier than 1.0.4 in CI logs or dependency manifests
Detection Strategies
- Inspect pickle files with pickletools.dis and flag any GLOBAL or STACK_GLOBAL opcodes referencing the listed modules
- Audit pipeline logs for picklescan results paired with the scanner version, and treat versions before 1.0.4 as untrusted
- Apply EDR behavioral rules that alert on Python processes spawning shell interpreters or executing os.popen-style call chains
- Hunt for newly created pickle artifacts in shared model registries and rescan with a current scanner before promotion
Monitoring Recommendations
- Track picklescan package versions across build agents, notebooks, and inference servers using software bill of materials data
- Enable process-tree telemetry on hosts that deserialize model files and correlate Python parents with shell or network utility children
- Forward model registry access and download events to a central log store for retroactive search when new IOCs surface
How to Mitigate CVE-2026-56315
Immediate Actions Required
- Upgrade picklescan to version 1.0.4 or later across all environments that scan or distribute pickle files
- Quarantine any third-party pickle or model files that were validated by picklescan versions earlier than 1.0.4 and rescan with the patched release
- Restrict loading of pickle files to trusted, signed sources and isolate deserialization to sandboxed workers without network egress
- Review recent CI/CD logs for picklescan results to identify artifacts that may have passed scanning under the vulnerable version
Patch Information
The maintainer addressed the issue in picklescan 1.0.4 by extending the block list to cover the affected standard library modules and functions. Refer to the GitHub Security Advisory GHSA-g38g-8gr9-h9xp for the patched release notes.
Workarounds
- Replace pickle-based model formats with safer alternatives such as safetensors where feasible
- Execute pickle deserialization inside a container or unprivileged process with no network access and read-only filesystem mounts
- Maintain an internal allowlist of approved publishers and reject pickle files originating outside that list until patched scanning is in place
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

