{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-32807","published":"2021-07-30T22:15:07.967000Z","last_modified":"2026-06-17T03:53:40.153000Z","status":"Modified","cvss":{"version":"3.1","score":7.2,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":true,"cwes":["CWE-915","CWE-1321"],"cpes":[{"criteria":"cpe:2.3:a:zope:accesscontrol:*:*:*:*:*:*:*:*","part":"a","vendor":"zope","product":"accesscontrol","version_start_including":"4.0","version_end_excluding":"4.3"},{"criteria":"cpe:2.3:a:zope:accesscontrol:*:*:*:*:*:*:*:*","part":"a","vendor":"zope","product":"accesscontrol","version_start_including":"5.0","version_end_excluding":"5.2"}],"cpes_truncated":false,"vendors":["zope"],"products":["zope/accesscontrol"],"epss":{"score":0.02107,"percentile":0.82443,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-qcx9-j53g-ccgf","ecosystem":"PyPI","name":"accesscontrol","purl":"pkg:pypi/accesscontrol","ranges":[{"introduced":"4.0","fixed":"4.3"}],"versions":["4.0","4.1","4.2"],"versions_truncated":false},{"advisory":"GHSA-qcx9-j53g-ccgf","ecosystem":"PyPI","name":"accesscontrol","purl":"pkg:pypi/accesscontrol","ranges":[{"introduced":"5.0","fixed":"5.2"}],"versions":["5.0","5.1"],"versions_truncated":false},{"advisory":"PYSEC-2021-335","ecosystem":"PyPI","name":"accesscontrol","purl":"pkg:pypi/accesscontrol","ranges":[{"introduced":"4.0","fixed":"4.3"},{"introduced":"5.0","fixed":"5.2"}],"versions":["4.0","4.1","4.2","5.0","5.1"],"versions_truncated":false},{"advisory":"GHSA-qcx9-j53g-ccgf","ecosystem":"PyPI","name":"zope","purl":"pkg:pypi/zope","ranges":[{"introduced":"4.0","fixed":"4.3"}],"versions":["4.0","4.1","4.1.1","4.1.2","4.1.3","4.2","4.2.1"],"versions_truncated":false},{"advisory":"GHSA-qcx9-j53g-ccgf","ecosystem":"PyPI","name":"zope","purl":"pkg:pypi/zope","ranges":[{"introduced":"5.0","fixed":"5.2"}],"versions":["5.0","5.1","5.1.1","5.1.2"],"versions_truncated":false},{"advisory":"PYSEC-2021-875","ecosystem":"PyPI","name":"zope","purl":"pkg:pypi/zope","ranges":[{"introduced":"4.0","fixed":"4.3"},{"introduced":"5.0","fixed":"5.2"}],"versions":["4.0","4.1","4.1.1","4.1.2","4.1.3","4.2","4.2.1","5.0","5.1","5.1.1","5.1.2","4.0b7","4.0b6","4.0b5","4.0b4","4.0b3","4.0b2","4.0b1","4.0a7","4.0a6","4.0a5","3.0.12","4.0a3","4.0a2","4.0a1","3.0.11","3.0.10","3.0.9","3.0.8","3.0.7"],"versions_truncated":false}],"severity":"high","priority_score":43,"links":{"html_es":"/es/cve/CVE-2021-32807/","html_en":"/en/cve/CVE-2021-32807/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-32807","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-32807"},"untrusted":{"vendor_name":"Zope","product_name":"Accesscontrol","desc_en":"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.","affected":[{"untrusted_vendor":"zopefoundation","untrusted_product":"AccessControl","versions":[]}],"references":[{"url":"https://github.com/zopefoundation/AccessControl/blob/master/CHANGES.rst#51-2021-07-30","tags":["Release Notes","Third Party Advisory"]},{"url":"https://github.com/zopefoundation/AccessControl/commit/b42dd4badf803bb9fb71ac34cd9cb0c249262f2c","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-qcx9-j53g-ccgf","tags":["Third Party Advisory"]}]}}