CVE-2023-41039Zope Restrictedpython
High 7.7
Follow: this CVE · Zope · Zope Restrictedpython We alert you by email or Slack (account required).
- Priority
- 46
- CVSS 3.1
- 7.7
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 59
- Auth required
- Yes
- Published
- Aug 30, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-74
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
What happens
RestrictedPython is a restricted execution environment for Python to run untrusted code. Python's "format" functionality allows someone controlling the format string to "read" all objects accessible through recursive attribute lookup and subscription from objects he can access. This can lead to critical information disclosure. With `RestrictedPython`, the format functionality is available via the `format` and `format_map` methods of `str` (and `unicode`) (accessed either via the class or its instances) and via `string.Formatter`. All known versions of `RestrictedPython` are vulnerable. This issue has been addressed in commit `4134aedcff1` which has been included in the 5.4 and 6.2 releases. Users are advised to upgrade. There are no known workarounds for this vulnerability.
What to do
- Apply the vendor's security update for Restrictedpython.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | restrictedpython |
< 5.4 |
5.4 |
pip install "restrictedpython>=5.4" |
| PyPI | restrictedpython |
≥ 6.0 < 6.2 |
6.2 |
pip install "restrictedpython>=6.2" |
| PyPI | restrictedpython |
≥ 6.0 < 6.2 |
6.2 |
pip install "restrictedpython>=6.2" |
| PyPI | restrictedpython |
< 5.4 |
5.4 |
pip install "restrictedpython>=5.4" |
Per OSV / GitHub Advisories (GHSA-xjw2-6jm9-rf67, PYSEC-2023-159). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| zope | restrictedpython | < 5.4 |
| zope | restrictedpython | ≥ 6.0 < 6.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Vendor Advisory