Description
picklescan before 0.0.29 fails to detect malicious pickle payloads that utilize lib2to3.pgen2.grammar.Grammar.loads in the reduce method, allowing remote code execution. Attackers can craft pickle files embedding dangerous code that evades picklescan detection and executes during pickle.load() deserialization.
Published: 2026-07-04
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

picklescan before 0.0.29 contains an unsafe deserialization flaw (CWE-502) arising from the use of lib2to3.pgen2.grammar.Grammar.loads inside a reduce method. An attacker can craft a pickle file that embeds executable code that bypasses picklescan's detection logic, causing that code to run when the payload is deserialized with pickle.load(). This flaw enables arbitrary remote code execution on any system that processes the malicious pickle.

Affected Systems

The vulnerability affects picklescan packages published by mmaitre314. All releases older than version 0.0.29 are vulnerable. Based on the description, it is inferred that releases 0.0.29 and newer have addressed the misuse of Grammar.loads, although this is not explicitly confirmed in the CVE record.

Risk and Exploitability

The CVSS score of 7.6 indicates a high severity, while the EPSS score of less than 1 % points to a low probability of exploitation in the current threat landscape. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires an attacker to deliver a carefully crafted pickle file to an application that uses picklescan for validation and then performs pickle.load(), leading to remote code execution on the host system.

Generated by OpenCVE AI on July 21, 2026 at 08:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade picklescan to version 0.0.29 or newer to ensure that Grammar.loads-based payloads are rejected.
  • If an upgrade is not possible, limit pickle.load() to data that comes from trusted sources; add a whitelist or pre‑validation step that rejects payloads containing lib2to3.pgen2.grammar.loads patterns before deserialization.
  • Consider switching to a safer serialization library, such as msgpack or safe YAML, which do not rely on Python’s pickle mechanism and are immune to this flaw.

Generated by OpenCVE AI on July 21, 2026 at 08:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 06 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sat, 04 Jul 2026 01:45:00 +0000

Type Values Removed Values Added
Description picklescan before 0.0.29 fails to detect malicious pickle payloads that utilize lib2to3.pgen2.grammar.Grammar.loads in the reduce method, allowing remote code execution. Attackers can craft pickle files embedding dangerous code that evades picklescan detection and executes during pickle.load() deserialization.
Title picklescan - Unsafe Deserialization via lib2to3.pgen2.grammar.Grammar.loads
First Time appeared Mmaitre314
Mmaitre314 picklescan
Weaknesses CWE-502
CPEs cpe:2.3:a:mmaitre314:picklescan:*:*:*:*:*:*:*:*
Vendors & Products Mmaitre314
Mmaitre314 picklescan
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 7.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Mmaitre314 Picklescan
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-06T16:27:31.500Z

Reserved: 2026-06-20T12:55:02.882Z

Link: CVE-2025-71359

cve-icon Vulnrichment

Updated: 2026-07-06T16:27:28.279Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-21T09:00:03Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data