CVE-2025-56005
BaseFortify
Publication date: 2026-01-20
Last updated on: 2026-02-06
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| dabeaz | ply | 3.11 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-502 | The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the PLY (Python Lex-Yacc) library version 3.11 and involves an undocumented parameter called `picklefile` in the `yacc()` function. This parameter allows loading parser tables from a pickle (.pkl) file using Python's `pickle.load()` without any validation. Since the pickle module can execute arbitrary code during deserialization (via methods like `__reduce__()`), an attacker who controls the pickle file can execute arbitrary code remotely when the parser initializes. This creates a stealthy backdoor and persistence risk because the feature is undocumented and active in the PyPI release, allowing remote code execution before any parsing logic runs. [1]
How can this vulnerability impact me? :
This vulnerability can lead to remote code execution (RCE) on systems using PLY 3.11 if they load parser tables from untrusted or attacker-controlled pickle files. An attacker can execute arbitrary code during application startup, potentially gaining persistent and stealthy control over the affected system. This is especially dangerous in environments where parser tables are cached on disk, shared across users or services, used in CI/CD pipelines, or loaded from configurable or writable paths. The impact includes full compromise of confidentiality, integrity, and availability of the system. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection involves identifying usage of the vulnerable PLY version 3.11 and checking for the presence or use of the undocumented `picklefile` parameter in calls to `ply.yacc.yacc()`. You can search your codebase or runtime environment for invocations of `yacc()` with the `picklefile` argument. Additionally, look for `.pkl` files used as parser tables that might be loaded unsafely. For example, you can run commands like `grep -r "yacc(picklefile=" ./` in your project directories to find usage of the parameter. Monitoring for unexpected file creation such as `/tmp/pwned` (from the proof of concept) or suspicious process executions during parser initialization may also help detect exploitation attempts. [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include: avoid using the `picklefile` parameter with untrusted or writable files; do not load parser tables from user-controlled or writable locations; treat all pickle files as unsafe input; prefer regenerating parser tables at runtime rather than loading them from disk; and restrict permissions on any `.pkl` files used to prevent tampering. Additionally, review and update your dependencies to a patched version of PLY once available, and monitor for any suspicious activity related to parser initialization. [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided resources do not explicitly discuss the impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA. However, given that the vulnerability allows remote code execution via unsafe deserialization, it could potentially lead to unauthorized access or data breaches, which may affect compliance with data protection regulations. Specific compliance implications are not detailed in the available information. [1]