cve.bz

CVE-2023-41039 zope restrictedpython: Injection

7.7 highEPSS 0.7%Fix available

High (7.7) in zope restrictedpython. EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in restrictedpython 5.4, 6.2.

On this page
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.

Severity

CVSS 3.1

7.7 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 53rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-10-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-41039 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-41039?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-41039?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-41039 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
zope:restrictedpythonbefore 5.4
zope:restrictedpythonfrom 6.0 before 6.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xjw2-6jm9-rf67PyPIrestrictedpython<5.45.4
GHSA-xjw2-6jm9-rf67PyPIrestrictedpython>=6.0 <6.26.2
PYSEC-2023-159PyPIrestrictedpython>=6.0 <6.2
<5.4
6.2, 5.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12restrictedpythonno fix listedDEBIAN-CVE-2023-41039
Debian13, 14restrictedpython6.2-1DEBIAN-CVE-2023-41039
UbuntuPro:20.04:LTSrestrictedpython4.0~b3-2ubuntu0.1~esm1UBUNTU-CVE-2023-41039 USN-7355-1
UbuntuPro:22.04:LTSrestrictedpython4.0~b3-3ubuntu0.1~esm1UBUNTU-CVE-2023-41039 USN-7355-1
UbuntuPro:24.04:LTSrestrictedpython6.2-1ubuntu0.24.04.1~esm1USN-7355-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON