CVE-2018-14572
Remote code execution via crafted .pickle file in conference-scheduler-cli: High-risk vulnerability
- CVSS 7.8
- CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- Input Validation and Sanitization
- Remote
In conference-scheduler-cli, a pickle.load call on imported data allows remote attackers to execute arbitrary code via a crafted .pickle file, as demonstrated by Python code that contains an os.system call.
- CWE
- CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- CVSS base score
- 7.8
- Published
- 2018-08-28
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Serialization Issues
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Update conference-scheduler-cli to the latest version.
Vulnerable code sample
import pickle
import os
def load_pickle(file_path):
with open(file_path, 'rb') as file:
# Vulnerable code that allows execution of arbitrary code
data = pickle.load(file)
return data
# Example usage
# data = load_pickle('data.pickle')Patched code sample
import pickle
def safe_load_pickle(file_path):
with open(file_path, 'rb') as file:
# Use a safer alternative to pickle.load
data = pickle.load(file, fix_imports=True, encoding="bytes")
return data
# Example usage
# data = safe_load_pickle('data.pickle')Cite this entry
@misc{vaitp:cve201814572,
title = {{Remote code execution via crafted .pickle file in conference-scheduler-cli: High-risk vulnerability}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2018},
note = {VAITP Python Vulnerability Dataset, entry CVE-2018-14572},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2018-14572/}}
}
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 ::
