7.2

CVE-2021-32807: Remote Code Execution via unsafe classes in otherwise permitted modules

Modified
AliasesGHSA-qcx9-j53g-ccgfPYSEC-2021-335PYSEC-2021-875
Published 30-07-2021Last modified 03-08-2024

Vulnerability summary

CVE-2021-32807 is a high (CVSS 7.2) vulnerability in zope accesscontrol. EPSS estimates a 2.05% chance of exploitation in the next 30 days, higher than 81.2% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 4.4, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.2/10
010
High · v3.1 (NVD)
EPSS score
2.05%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 1

Timeline

  1. 30-07-2021
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

5 scores · 3 sources · 3 versions

EPSS trend

Probability

2.05%

Chance of exploitation in the next 30 days

Percentile

81%

Versus all other CVEs

30-day change

No change 0.00 pp

From 2.05% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, administrative account, no user interaction (CVSS vector). Other conditions: not stated in public data.

PyPI2 products
  • accesscontrol≥ 4.0, < 4.3 | < b42dd4badf803bb9fb71ac34cd9cb0c249262f2c | ≥ 5.0, < 5.2
  • zope≥ 4.0, < 4.3 | < b42dd4badf803bb9fb71ac34cd9cb0c249262f2c | ≥ 5.0, < 5.2
Zope1 product
Zopefoundation1 product

3 vendors · 4 products

References

13 links
Show all 13 references