CVE Vulnerabilities

CVE-2021-32811

Improperly Controlled Modification of Dynamically-Determined Object Attributes

Published: Aug 02, 2021 | Modified: Nov 21, 2024
CVSS 3.x
7.2
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.5 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM

Zope is an open-source web application server. Zope versions prior to versions 4.6.3 and 5.3 have a remote code execution security issue. In order to be affected, one must use Python 3 for ones Zope deployment, run Zope 4 below version 4.6.3 or Zope 5 below version 5.3, and have the optional Products.PythonScripts add-on package installed. By default, one must have the admin-level Zope Manager role to add or edit Script (Python) objects through the web. Only sites that allow untrusted users to add/edit these scripts through the web are at risk. Zope releases 4.6.3 and 5.3 are not vulnerable. As a workaround, a site administrator can restrict adding/editing Script (Python) objects through the web using the standard Zope user/role permission mechanisms. Untrusted users should not be assigned the Zope Manager role and adding/editing these scripts through the web should be restricted to trusted users only. This is the default configuration in Zope.

Weakness

The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.

Affected Software

Name Vendor Start Version End Version
Accesscontrol Zope 4.0 (including) 4.3 (excluding)
Accesscontrol Zope 5.0 (including) 5.2 (excluding)
Zope Zope 4.0 (including) 4.6.3 (excluding)
Zope Zope 5.0 (including) 5.3 (excluding)
Zope2.13 Ubuntu bionic *
Zope2.13 Ubuntu trusty *
Zope2.13 Ubuntu xenial *

Extended Description

If the object contains attributes that were only intended for internal use, then their unexpected modification could lead to a vulnerability. This weakness is sometimes known by the language-specific mechanisms that make it possible, such as mass assignment, autobinding, or object injection.

Potential Mitigations

  • If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists.
  • For applications written with Ruby on Rails, use the attr_accessible (allowlist) or attr_protected (denylist) macros in each class that may be used in mass assignment.

References