Vulnerability in zope (CVE-2021-32811)
Summary
Vulnerability in zope (CVE-2021-32811). Successful exploitation can lead to full system takeover. Exploitable via Products.PythonScripts. Mitigation: upgrade to 5.3 or later.
Original description
The description as published by the source.
Impact
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:
- You use Python 3 for your Zope deployment (Zope 4 on Python 2 is not affected)
- You run Zope 4 below version 4.6.3 or Zope 5 below version 5.3
- You have installed the optional
Products.PythonScriptsadd-on package
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.
Patches
The problem has been fixed in AccessControl versions 4.3 and 5.2. Zope releases 4.6.3…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2021-32811 has been found in zope.
Attackers can target a specific entry point like Products.PythonScripts over the network to misuse the product.
Successful exploitation can lead to full system takeover.
What to do: upgrade zope to 5.3 or later.
If unsure, ask your IT team or search "zope CVE-2021-32811" on the vendor's site.
CVE-2021-32811 (zope) — CWE-1321
Attack vector: remote (network-reachable) / no user interaction
Attack surface: Products.PythonScripts / RestrictedPython / AccessControl / string
Patched: 5.3 — apply immediately
Workaround: A site administrator can restrict adding/editing Script (Python) objects through the web using the standard Zope user/role permission mechanisms.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-1321) exists in zope. Attackers reach the vulnerable code path via Products.PythonScripts.
Check the vendor advisory for the affected versions of zope. Attack surface: Products.PythonScripts / RestrictedPython / AccessControl / string.
Severity: ?. Successful exploitation can lead to full system takeover.
Update to 5.3.
Workaround: A site administrator can restrict adding/editing Script (Python) objects through the web using the standard Zope user/role permission mechanisms.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'zope' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'zope' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
zopeを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
A site administrator can restrict adding/editing Script (Python) objects through the web using the standard Zope user/role permission mechanisms.パッチが適用されるまでの応急処置として、A site administrator can restrict adding/editing Script (Python) objects through the web using the standard Zope user/role permission mechanisms. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade zope to 5.3ステージング環境で 5.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com