CVE-2023-41039

CVE-2023-41039 is a high-severity vulnerability in Zope Restrictedpython with a CVSS 3.x base score of 8.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-74.

Key facts

Description

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.

Frequently asked questions

What is CVE-2023-41039?
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.
How severe is CVE-2023-41039?
CVE-2023-41039 has a CVSS 3.x base score of 8.3, rated high severity. It is exploitable over network with low attack complexity, requires high privileges and user interaction. Impact on confidentiality is high, integrity high, and availability low.
Is CVE-2023-41039 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (46th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2023-41039?
CVE-2023-41039 affects Zope Restrictedpython. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2023-41039?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
When was CVE-2023-41039 published?
CVE-2023-41039 was published on 2023-08-30 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Zope Restrictedpython

All CVEs affecting Zope Restrictedpython →

Other CWE-74 (Improper Neutralization of Special Elements (Injection)) vulnerabilities

Browse all CWE-74 (Improper Neutralization of Special Elements (Injection)) vulnerabilities →