VAITP Dataset

← Back to the dataset

CVE-2016-4043

Chameleon vulnerability in Plone 5.0rc1 – 5.1a1: Authenticated users bypass Restricted Python via template permissions

  • CVSS 4.9
  • CWE-264
  • Authentication, Authorization, and Session Management
  • Remote

Chameleon (five.pt) in Plone 5.0rc1 through 5.1a1 allows remote authenticated users to bypass Restricted Python by leveraging permissions to create or edit templates.

CVSS base score
4.9
Published
2017-02-24
OWASP
A01 Broken Access Control
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Remote
Impact
Privilege Escalation
Fixed by upgrading
Yes

Solution

Upgrade Plone to version 5.1a2 or higher.

Vulnerable code sample

from Products.Five import BrowserView

class TemplateView(BrowserView):
    def __call__(self):
        return self.render_template()

    def render_template(self):
        return self.context.restrictedTraverse('template_view')()

Patched code sample

from Products.Five import BrowserView
from AccessControl import getSecurityManager
from AccessControl import Unauthorized

class TemplateView(BrowserView):
    def __call__(self):
        if not getSecurityManager().checkPermission('View', self.context):
            raise Unauthorized("You do not have permission to view this template.")
        
        return self.render_template()

    def render_template(self):
        return self.context.restrictedTraverse('template_view')()

Cite this entry

@misc{vaitp:cve20164043,
  title        = {{Chameleon vulnerability in Plone 5.0rc1 - 5.1a1: Authenticated users bypass Restricted Python via template permissions}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2017},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2016-4043},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2016-4043/}}
}
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 ::