Back

CRITICAL

ply: python-ply: Unsafe pickle file handling in Ply

Published Jan 20, 2026

Description

An undocumented and unsafe feature in the PLY (Python Lex-Yacc) library 3.11 allows Remote Code Execution (RCE) via the `picklefile` parameter in the `yacc()` function. This parameter accepts a `.pkl` file that is deserialized with `pickle.load()` without validation. Because `pickle` allows execution of embedded code via `__reduce__()`, an attacker can achieve code execution by passing a malicious pickle file. The parameter is not mentioned in official documentation or the GitHub repository, yet it is active in the PyPI version. This introduces a stealthy backdoor and persistence risk. NOTE: A third-party states that this vulnerability should be rejected because the proof of concept does not demonstrate arbitrary code execution and fails to complete successfully.

Affected products

Remediation

Red Hat statement

This vulnerability rates as Important rather than Critical because it only affects applications using an undocumented parameter (picklefile) in legacy PLY versions 3.2-3.11, which was designed for an atypical use case (Jython environments with oversized parser tables). Exploitation requires the target application to have explicitly implemented this undocumented parameter in their code and depends on the attacker's ability to influence which pickle file gets loaded—whether through shared directory race conditions, configuration injection, supply chain compromise, or chaining with separate vulnerabilities like file upload or path traversal—making this a conditional, context-dependent vulnerability rather than a universally exploitable critical flaw.

References (15)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner mitre
Published Jan 20, 2026
Updated Sep 17, 2026
Reserved Aug 16, 2025
CISA Vulnrichment
Updated Jan 20, 2026
NVD
Status Modified
Modified Sep 17, 2026
Red Hat
Severity Important
Public date Jan 20, 2026