CVE-2007-5741
Remote code execution in Plone 2.5.0 – 2.5.4 and 3.0.0 – 3.0.2 via pickled objects in network data
- CVSS 7.5
- CWE-94 Improper Control of Generation of Code ('Code Injection')
- Input Validation and Sanitization
- Remote
Plone 2.5 through 2.5.4 and 3.0 through 3.0.2 allows remote attackers to execute arbitrary Python code via network data containing pickled objects for the (1) statusmessages or (2) linkintegrity module, which the module unpickles and executes.
- CVSS base score
- 7.5
- Published
- 2007-11-07
- 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
- Plone
- Fixed by upgrading
- Yes
Solution
Update Plone to version 3.0.3 or higher.
Vulnerable code sample
import pickle
def handle_data(input_data):
try:
# Directly unpickling data from an untrusted source
data = pickle.loads(input_data) # Vulnerable code
# Process the data
except Exception as e:
# Handle exceptions appropriately
print("Error processing data:", e)
# Example usage
# input_data = ... # This would be the incoming pickled data
# handle_data(input_data)Patched code sample
import pickle
def safe_loads(data):
# Use a safer alternative to unpickle data
return data # Replace this with a safer deserialization method
def handle_data(input_data):
# Instead of directly unpickling, validate or sanitize input
try:
# Simulating the unpickle operation
# data = pickle.loads(input_data) # Vulnerable code
data = safe_loads(input_data) # Fixed code
# Process the data safely
except Exception as e:
# Handle exceptions appropriately
print("Error processing data:", e)
# Example usage
# input_data = ... # This would be the incoming data
# handle_data(input_data)Cite this entry
@misc{vaitp:cve20075741,
title = {{Remote code execution in Plone 2.5.0 - 2.5.4 and 3.0.0 - 3.0.2 via pickled objects in network data}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2007},
note = {VAITP Python Vulnerability Dataset, entry CVE-2007-5741},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2007-5741/}}
}
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 ::
