VAITP Dataset

← Back to the dataset

CVE-2017-1000483

Plone versions 4 and 5: Private content access via str.format in through-the-web templates and scripts

  • CVSS 6.5
  • CWE-116: Improper Encoding or Escaping of Output
  • Input Validation and Sanitization
  • Remote

Accessing private content via str.format in through-the-web templates and scripts in Plone 2.5-5.1rc1. This improves an earlier hotfix. Since the format method was introduced in Python 2.6, this part of the hotfix is only relevant for Plone 4 and 5.

CVSS base score
6.5
Published
2018-01-03
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Direct Object References (IDOR)
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Python
Fixed by upgrading
Yes

Solution

Update Plone to version 5.2 or higher.

Vulnerable code sample

# Vulnerable code snippet
def render_template(template, context):
    return template.format(**context)

# Example context with private attributes
context = {
    'name': 'Alice',
    '_private_info': 'This is private'
}

# This would allow access to private attributes
output = render_template("Hello, {name}. Your info: {private_info}", context)

Patched code sample

# Example of a vulnerable code snippet
def render_template(template, context):
    return template.format(**context)

# Example of a fixed code snippet
def safe_render_template(template, context):
    # Use a safe method to avoid accessing private attributes
    safe_context = {k: v for k, v in context.items() if not k.startswith('_')}
    return template.format(**safe_context)

Cite this entry

@misc{vaitp:cve20171000483,
  title        = {{Plone versions 4 and 5: Private content access via str.format in through-the-web templates and scripts}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2018},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2017-1000483},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2017-1000483/}}
}

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.