VAITP Dataset

← Back to the dataset

CVE-2020-28734

Plone < 5.2.3, XXE vuln, 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 explicitly only available to the Manager role.

CVSS base score
8.8
Published
2020-12-30
OWASP
A07 Identification and Authentication Failures
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Plone
Fixed by upgrading
Yes

Solution

Update to Plone 5.2.3 or higher.

Vulnerable code sample

from lxml import etree
from plone.api import portal

def handle_upload(xml_data):
    if portal.get().has_permission('Manage portal', portal.get()):
        # Vulnerable XML parsing that allows XXE
        parsed_data = etree.fromstring(xml_data.encode('utf-8'))

        # Process the parsed data
        # ...

Patched code sample

from lxml import etree
from plone.api import portal

def safe_parse(xml_string):
    parser = etree.XMLParser(load_dtd=False, no_network=True)
    return etree.fromstring(xml_string.encode('utf-8'), parser)

def handle_upload(xml_data):
    if not portal.get().has_permission('Manage portal', portal.get()):
        raise Exception("Unauthorized access")

    # Use the safe XML parser to prevent XXE
    parsed_data = safe_parse(xml_data)

    # Process the parsed data
    # ...

Cite this entry

@misc{vaitp:cve202028734,
  title        = {{Plone < 5.2.3, XXE vuln, Manager role}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2020},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2020-28734},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2020-28734/}}
}

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.