Vulnerabilities in pkg:pypi/Zope

PACKAGE
Advisory Identifier: GHSA-rpcg-f9q6-2mq6
Advisory Summary

CVE-2021-32674 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Zope libraries in the PyPI ecosystem. The issue involves remote code execution via traversal in tal expressions. Remediation is available by upgrading affected packages to version 5.2.1, 4.6.1.

10 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/Zope

10 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/Zope. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rpcg-f9q6-2mq6 CVE-2021-32674 HIGH Remote Code Execution via traversal in TAL expressions
GHSA-qh4q-fwf8-qqrw CVE-2010-3198 HIGH Zope Denial of Service (DoS) vulnerability in ZServer
GHSA-m755-gxxg-r5qh CVE-2023-44389 LOW Zope management interface vulnerable to stored cross site scripting via the title property
GHSA-5pr9-v234-jw36 CVE-2021-32633 HIGH Remote Code Execution via traversal in TAL expressions
GHSA-5vq5-pg3r-9ph3 - HIGH Duplicate Advisory: Path Traversal in Zope
GHSA-962m-m8jw-8wrr - HIGH Duplicate Advisory: Path Traversal in Zope
GHSA-g5vw-3h65-2q3v CVE-2024-51734 MODERATE Access control vulnerable to user data deletion by anonynmous users
GHSA-g4gq-j4p2-j8fr CVE-2021-32811 HIGH Remote Code Execution via Script (Python) objects under Python 3
GHSA-wm8q-9975-xh5v CVE-2023-42458 LOW Zope vulnerable to Stored Cross Site Scripting with SVG images
GHSA-8xv7-89vj-q48c CVE-2023-41050 MODERATE Information disclosure in AccessControl

CVE-2021-32674 at a Glance

CVE Identifier CVE-2021-32674
GHSA Identifier GHSA-rpcg-f9q6-2mq6
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Zope
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-32674

To remediate this vulnerability, upgrade all affected Zope dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Zope fixed: 5.2.1
pip install Zope>=5.2.1
Zope fixed: 4.6.1
pip install Zope>=4.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Zope

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-32674, inspect your installed packages using pip:

pip show Zope

Analyze the terminal output to locate any version of Zope in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.1), your application is affected.

Note: The pip show Zope command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Zope, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. ### Impact 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. ### Patches The problem has been fixed in Zope 5.21 and 4.6.1. ### Workarounds 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. ### References * [The previous advisory (GHSA-5pr9-v234-jw36)](https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36) ### For more information If you have any questions or comments about this advisory: * Open an issue in the [Zope issue tracker](https://github.com/zopefoundation/Zope/issues) * Email us at [security@plone.org](mailto:security@plone.org)

CVE-2021-32674 Affected Zope Versions

2 component(s)
Fixed Versions:
5.2.14.6.1
Product / Package Ecosystem Affected Versions Fixed Version
Zope
PyPI
≥ 5.0
< 5.2.1
5.2.1
Zope
PyPI
< 4.6.1
4.6.1

References

Frequently Asked Questions

What is CVE-2021-32674?
CVE-2021-32674 is a security vulnerability in Zope involving Remote Code Execution via traversal in TAL expressions under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Zope versions are affected?
Affected versions include releases prior to 5.2.1, 4.6.1 across affected packages: Zope.
What version fixes CVE-2021-32674?
Upgrading to 5.2.1, 4.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Zope affected?
Yes, Zope is affected in releases prior to 5.2.1, 4.6.1. Upgrade your dependency to 5.2.1, 4.6.1 or later.
What is the CVSS score of CVE-2021-32674?
CVE-2021-32674 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-32674?
CVE-2021-32674 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2021-32674?
Run the dependency tree command: 'pip show Zope'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rpcg-f9q6-2mq6",
  "modified" : "2026-06-09T13:02:32Z",
  "published" : "2021-06-08T18:45:52Z",
  "aliases" : [ "CVE-2021-32674" ],
  "summary" : "Remote Code Execution via traversal in TAL expressions",
  "details" : "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.\n\n### Impact\nMost 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.\n\nBy 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.\n\n### Patches\nThe problem has been fixed in Zope 5.21 and 4.6.1.\n\n### Workarounds\nThe 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.\n\n### References\n* [The previous advisory (GHSA-5pr9-v234-jw36)](https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in the [Zope issue tracker](https://github.com/zopefoundation/Zope/issues)\n* Email us at [security@plone.org](mailto:security@plone.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Zope"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0"
      }, {
        "fixed" : "5.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Zope"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/security/advisories/GHSA-5pr9-v234-jw36"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/security/advisories/GHSA-rpcg-f9q6-2mq6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32674"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/commit/1d897910139e2c0b11984fc9b78c1da1365bec21"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-5vq5-pg3r-9ph3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/zope/PYSEC-2021-104.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zopefoundation/Zope"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/Zope"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-08T17:17:21Z",
    "nvd_published_at" : null
  }
}