CVE-2021-33509
Plone 5.2.4 allows remote managers to perform unauthorized disk I/O via crafted Python script keyword arguments
- CVSS 9.9
- CWE-732 Incorrect Permission Assignment for Critical Resource
- Input Validation and Sanitization
- Remote
Plone through 5.2.4 allows remote authenticated managers to perform disk I/O via crafted keyword arguments to the ReStructuredText transform in a Python script.
- CVSS base score
- 9.9
- Published
- 2021-05-21
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Privilege Escalation
- Fixed by upgrading
- Yes
Solution
Update Plone to version 5.2.5 or higher.
Vulnerable code sample
from plone.restapi.services import Service
class ReStructuredTextTransform(Service):
def __call__(self):
data = self.request.get('data', None)
transformed_data = self.restructured_text_transform(data)
return transformed_data
def restructured_text_transform(self, data):
return {"result": "Transformed data"}Patched code sample
from plone.restapi.services import Service
from plone.restapi.services import json_response
from plone.restapi.services.exceptions import BadRequest
class ReStructuredTextTransform(Service):
def __call__(self):
data = self.request.get('data', None)
if data is None:
raise BadRequest("No data provided")
sanitized_data = self.sanitize_input(data)
transformed_data = self.restructured_text_transform(sanitized_data)
return json_response(transformed_data)
def sanitize_input(self, data):
if not isinstance(data, str):
raise BadRequest("Invalid input type")
return data.replace("..", "").replace("/", "").replace("\\", "")
def restructured_text_transform(self, data):
return {"result": "Transformed data"}Cite this entry
@misc{vaitp:cve202133509,
title = {{Plone 5.2.4 allows remote managers to perform unauthorized disk I/O via crafted Python script keyword arguments}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2021},
note = {VAITP Python Vulnerability Dataset, entry CVE-2021-33509},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2021-33509/}}
}
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 ::
