CVE-2021-32811High· 7.5▾ TwilightRemote Code Execution via Script (Python) objects under Python 3
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0.5 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 9.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
2.3%
2.3% → 2.3%
Background: The optional add-on package Products.PythonScripts adds Script (Python) to the list of content items a user can add to the Zope object database. Inside these scripts users can write Python code that is executed when rendered through the web. The code environment in these script objects is limited, it relies on the RestrictedPython package to provide a "safe" subset of Python instructions as well as the AccessControl package that defines security policies for execution in the context of a Zope application.
Recently the AccessControl package was updated to fix a remote code execution security issue. A link to the security advisory is provided in the References section below. The bug tightens the AccessControl security policies for Zope by blocking access to unsafe classes inside the Python string module.
You are only affected if the following are true:
Products.PythonScripts add-on packageBy default, you need to 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 - which would be a very unusual configuration to begin with - are at risk.
The problem has been fixed in AccessControl versions 4.3 and 5.2. Zope releases 4.6.3 and 5.3 now require these new AccessControl releases.
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.
If you have any questions or comments about this advisory:
zope >= 4.0, < 4.6.3zope >= 5.0, < 5.3Upgrade to a patched release:
zope 4.6.3zope 5.3Connected by shared product, vendor, weakness, or advisory.
CVE-2023-44389Low· 3.1Zope management interface vulnerable to stored cross site scripting via the title property
CVE-2021-32674High· 8.8Remote Code Execution via traversal in TAL expressions
CVE-2023-42458Low· 3.7Zope vulnerable to Stored Cross Site Scripting with SVG images
CVE-2011-4924Medium· 6.1Zope XSS Vulnerability
CVE-2002-0170HighZope does not properly verify the access for objects with proxy roles
CVE-2021-32633Medium· 6.8Remote Code Execution via traversal in TAL expressions