VAITP Dataset

← Back to the dataset

CVE-2020-28736

XXE vulnerability in Plone 5.2.3: Allows XXE attacks via unapplied permission in plone.schemaeditor.ManageSchemata, limited to Manager role

  • CVSS 8.8
  • CWE-611 Improper Restriction of XML External Entity Reference
  • Input Validation and Sanitization
  • Remote

Plone before 5.2.3 allows XXE attacks via a feature that is protected by an unapplied permission of plone.schemaeditor.ManageSchemata (therefore, only available to the Manager role).

CVSS base score
8.8
Published
2020-12-30
OWASP
A01 Broken Access Control
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Direct Object References (IDOR)
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
Plone
Fixed by upgrading
Yes

Solution

Update Plone to version 5.2.3 or higher.

Vulnerable code sample

from plone.schemaeditor import ManageSchemata
from plone.schemaeditor import SchemaEditor

class VulnerableSchemaEditor(SchemaEditor):
    @ManageSchemata
    def update_schema(self, xml_input):
        # This method can only be called by users with the Manager role
        # Vulnerable XML parsing that allows XXE
        import xml.etree.ElementTree as ET
        return ET.fromstring(xml_input)  # DTD and external entities are processed

Patched code sample

from plone.schemaeditor import ManageSchemata
from plone.schemaeditor import SchemaEditor

class SecureSchemaEditor(SchemaEditor):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def parse_xml(self, xml_input):
        # Ensure that XML parsing is secure and does not allow XXE
        import xml.etree.ElementTree as ET
        parser = ET.XMLParser(load_dtd=False)  # Disable DTD to prevent XXE
        return ET.fromstring(xml_input, parser=parser)

    @ManageSchemata
    def update_schema(self, xml_input):
        # This method can only be called by users with the Manager role
        parsed_xml = self.parse_xml(xml_input)
        # Proceed with schema update using parsed_xml

Cite this entry

@misc{vaitp:cve202028736,
  title        = {{XXE vulnerability in Plone 5.2.3: Allows XXE attacks via unapplied permission in plone.schemaeditor.ManageSchemata, limited to Manager role}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2020},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2020-28736},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2020-28736/}}
}

Download this entry as JSON Download the whole dataset

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 ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.