CVE-2021-32807
CVE-2021-32807 is a medium-severity vulnerability in Zope Accesscontrol with a CVSS 3.x base score of 4.4. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-1321.
Key facts
- Severity: Medium (CVSS 3.x base score 4.4)
- CVSS v2: 6.5
- EPSS exploit prediction: 2% (79th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-1321
- Affected product: Zope Accesscontrol
- Published:
- Last modified:
Description
The module `AccessControl` defines security policies for Python code used in restricted code within Zope applications. Restricted code is any code that resides in Zope's object database, such as the contents of `Script (Python)` objects. The policies defined in `AccessControl` severely restrict access to Python modules and only exempt a few that are deemed safe, such as Python's `string` module. However, full access to the `string` module also allows access to the class `Formatter`, which can be overridden and extended within `Script (Python)` in a way that provides access to other unsafe Python libraries. Those unsafe Python libraries can be used for remote code execution. By 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 4.3 and 5.2. Only AccessControl versions 4 and 5 are vulnerable, and only on Python 3, not Python 2.7. 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.
Frequently asked questions
- What is CVE-2021-32807?
- The module `AccessControl` defines security policies for Python code used in restricted code within Zope applications. Restricted code is any code that resides in Zope's object database, such as the contents of `Script (Python)` objects. The policies defined in `AccessControl` severely restrict access to Python modules and only exempt a few that are deemed safe, such as Python's `string` module. However, full access to the `string` module also allows access to the class `Formatter`, which can be overridden and extended within `Script (Python)` in a way that provides access to other unsafe Python libraries. Those unsafe Python libraries can be used for remote code execution. By 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 4.3 and 5.2. Only AccessControl versions 4 and 5 are vulnerable, and only on Python 3, not Python 2.7. 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.
- How severe is CVE-2021-32807?
- CVE-2021-32807 has a CVSS 3.x base score of 4.4, rated medium severity. It is exploitable over network with high attack complexity, requires high privileges and no user interaction. Impact on confidentiality is none, integrity high, and availability none.
- Is CVE-2021-32807 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (79th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-32807?
- CVE-2021-32807 affects Zope Accesscontrol. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-32807?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-32807 published?
- CVE-2021-32807 was published on 2021-07-30 and last updated on 2026-06-17.
References
- https://github.com/zopefoundation/AccessControl/blob/master/CHANGES.rst#51-2021-07-30
- https://github.com/zopefoundation/AccessControl/commit/b42dd4badf803bb9fb71ac34cd9cb0c249262f2c
- https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-qcx9-j53g-ccgf
Affected products (1)
- cpe:2.3:a:zope:accesscontrol:*:*:*:*:*:*:*:*
More vulnerabilities in Zope Accesscontrol
- CVE-2021-32811 — High (CVSS 7.5): Zope is an open-source web application server. Zope versions prior to versions 4.6.3 and 5.3 have a remote code…
- CVE-2023-41050 — Medium (CVSS 6.8): AccessControl provides a general security framework for use in Zope. Python's "format" functionality allows someone…
All CVEs affecting Zope Accesscontrol →
Other CWE-1321 (Prototype Pollution) vulnerabilities
- CVE-2026-25142 — Critical (CVSS 10.0): SandboxJS is a JavaScript sandboxing library. Prior to 0.8.27, SanboxJS does not properly restrict __lookupGetter__…
- CVE-2024-39008 — Critical (CVSS 10.0): robinweser fast-loops v1.1.3 was discovered to contain a prototype pollution via the function objectMergeDeep. This…
- CVE-2024-38999 — Critical (CVSS 10.0): jrburke requirejs v2.3.6 was discovered to contain a prototype pollution via the function s.contexts._.configure. This…
- CVE-2022-29823 — Critical (CVSS 10.0): Feather-Sequalize cleanQuery method uses insecure recursive logic to filter unsupported keys from the query object.…
- CVE-2022-24760 — Critical (CVSS 10.0): Parse Server is an open source http web server backend. In versions prior to 4.10.7 there is a Remote Code Execution…
- CVE-2020-12079 — Critical (CVSS 10.0): Beaker before 0.8.9 allows a sandbox escape, enabling system access and code execution. This occurs because Electron…