CVE-2026-114608
Arbitrary code execution via crafted pickle in Pylint's predictable cache files.
- CVSS 5.4
- CWE-502
- Design Defects
- Local
Pylint is a static code analyser for Python. From 0.15.2 until 4.0.9, Pylint stores module statistics in predictable files under PYLINT_HOME and loads those files with pickle.load on a later run. An attacker who can write to a shared, group-writable, or otherwise untrusted cache directory can replace a stats cache with crafted serialized data, causing arbitrary code to execute with the privileges of the user who next runs Pylint. The default per-user cache is not normally writable by another user. This issue is fixed in version 4.0.9.
- CWE
- CWE-502
- CVSS base score
- 5.4
- Published
- 2026-10-22
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Design Defects
- Subcategory
- Poorly Designed Access Controls
- Accessibility scope
- Local
- Impact
- Arbitrary Code Execution
- Affected component
- Pylint
- Fixed by upgrading
- Yes
Solution
Upgrade Pylint to version 4.0.9 or later.
Vulnerable code sample
import os
import pickle
def load_pylint_stats():
# VULNERABLE: loading untrusted pickle from shared cache
cache_dir = os.getenv('PYLINT_HOME', '/tmp/pylint_cache')
stats_path = os.path.join(cache_dir, 'module_stats.pkl')
with open(stats_path, 'rb') as f:
return pickle.load(f) # insecure deserializationPatched code sample
import os
import json
def load_pylint_stats():
# FIX: use safe JSON deserialization instead of pickle
cache_dir = os.getenv('PYLINT_HOME', '/tmp/pylint_cache')
stats_path = os.path.join(cache_dir, 'module_stats.json')
with open(stats_path, 'r', encoding='utf-8') as f:
return json.load(f) # safe deserializationPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Store the results cache as JSON instead of pickle (pylint-dev/pylint)
pylint/lint/caching.py,pylint/lint/caching.py · load_results,pylint/lint/caching.py · save_results
Cite this entry
@misc{vaitp:cve2026114608,
title = {{Arbitrary code execution via crafted pickle in Pylint's predictable cache files.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-114608},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-114608/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
