CVE-2021-32674: Zope - Template Injection
- Cve: CVE-2021-32674
- Name: Zope - Template Injection
- Description: Zope is an open-source web application server. This advisory extends the previous advisory at https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36 with additional cases of TAL expression traversal vulnerabilities. Most Python modules are not available for using in TAL expressions that you can add through-the-web, for example in Zope Page Templates. This restriction avoids file system access, for example via the 'os' module. But some of the untrusted modules are available indirectly through Python modules that are available for direct use. By default, you need to have the Manager role to add or edit Zope Page Templates through the web. Only sites that allow untrusted users to add/edit Zope Page Templates through the web are at risk. The problem has been fixed in Zope 5.2.1 and 4.6.1. The workaround is the same as for https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36: A site administrator can restrict adding/editing Zope Page Templates through the web using the standard Zope user/role permission mechanisms. Untrusted users should not be assigned the Zope Manager role and adding/editing Zope Page Templates through the web should be restricted to trusted users only.
- Impact: Untrusted users with Manager role can execute arbitrary code via TAL expression traversal, potentially leading to full system compromise.
- Remediation: Upgrade to Zope 5.2.1 or 4.6.1. and restrict adding/editing templates to trusted users only.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: admin_privileges
- Requirements: Attacker needs Manager role and ability to add/edit Zope Page Templates
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.01587
- Epss percentile: 0.76237
- Assignee: [email protected]
- Published at: 2021-06-08T18:15:08Z
- Age in days: 1995
- Modified at: 2026-06-17T03:53:23Z
- Patch available: yes
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-32674
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/zopefoundation/Zope/commit/1d897910139e2c0b11984fc9b78c1da1365bec21 | Patch, Third Party Advisory |
| https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36 | Third Party Advisory |
| https://github.com/zopefoundation/Zope/security/advisories/GHSA-rpcg-f9q6-2mq6 | Third Party Advisory |
| https://pypi.org/project/Zope/ | Product |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| zope:zope | >= 5.0.0, < 5.2.1; < 4.6.1 | no | nvd | /v1/products/zope/zope |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| zopefoundation/Zope | commit, fix, package, security_advisory | yes | /v1/repositories/zopefoundation/Zope |
Index
- Repositories: 7
- Repositories high signal: 7
- Checked, none or zero: packages
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts