CVE catalog

CVE-2023-41039

RestrictedPython vulnerabilities

[CVE catalog]

Severity
Medium
Published
Source
[NVD] · [CVE record]
EPSS
0.68% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianrestrictedpythonsid8.4-1fixed
Debianrestrictedpythonforky8.4-1fixed
Debianrestrictedpythontrixie8.0-1fixed
Debianrestrictedpythonbookworm4.0~b3-3vulnerable
UbunturestrictedpythonnobleNot reportedvulnerable
Ubunturestrictedpythonnoble6.2-1ubuntu0.24.04.1~esm1fixed
Ubuntupython3-restrictedpythonnoble6.2-1ubuntu0.24.04.1~esm1fixed
Ubunturestrictedpythonpro4.0~b3-2vulnerable
Ubunturestrictedpythonpro4.0~b3-2ubuntu1vulnerable
Ubunturestrictedpythonpro4.0~b3-3vulnerable
Ubunturestrictedpythonpro4.0~b3-3ubuntu0.1~esm1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianrestrictedpythonsourcesid6.2-1not yet assignedNot reportedNot reported
Debianrestrictedpythonsourceforky6.2-1not yet assignedNot reportedNot reported
Debianrestrictedpythonsourcetrixie6.2-1not yet assignedNot reportedNot reported
Debianrestrictedpythonsourcebookworm(unfixed)not yet assignedNot reportedNot reported
Ubunturestrictedpythondebnoble6.2-1ubuntu0.24.04.1~esm1Not reportedNot reportedNot reported
Ubuntupython3-restrictedpythondebnoble6.2-1ubuntu0.24.04.1~esm1Not reportedNot reportedNot reported
Ubunturestrictedpythondebpro4.0~b3-3ubuntu0.1~esm1Not reportedUBUNTU-CVE-2023-41039Not reported

Notes

[bookworm] restrictedpython: Minor issue

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

References