
CVE catalog
CVE-2023-41039
RestrictedPython vulnerabilities
- 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.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | restrictedpython | sid | 8.4-1 | fixed |
| Debian | restrictedpython | forky | 8.4-1 | fixed |
| Debian | restrictedpython | trixie | 8.0-1 | fixed |
| Debian | restrictedpython | bookworm | 4.0~b3-3 | vulnerable |
| Ubuntu | restrictedpython | noble | Not reported | vulnerable |
| Ubuntu | restrictedpython | noble | 6.2-1ubuntu0.24.04.1~esm1 | fixed |
| Ubuntu | python3-restrictedpython | noble | 6.2-1ubuntu0.24.04.1~esm1 | fixed |
| Ubuntu | restrictedpython | pro | 4.0~b3-2 | vulnerable |
| Ubuntu | restrictedpython | pro | 4.0~b3-2ubuntu1 | vulnerable |
| Ubuntu | restrictedpython | pro | 4.0~b3-3 | vulnerable |
| Ubuntu | restrictedpython | pro | 4.0~b3-3ubuntu0.1~esm1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | restrictedpython | source | sid | 6.2-1 | not yet assigned | Not reported | Not reported |
| Debian | restrictedpython | source | forky | 6.2-1 | not yet assigned | Not reported | Not reported |
| Debian | restrictedpython | source | trixie | 6.2-1 | not yet assigned | Not reported | Not reported |
| Debian | restrictedpython | source | bookworm | (unfixed) | not yet assigned | Not reported | Not reported |
| Ubuntu | restrictedpython | deb | noble | 6.2-1ubuntu0.24.04.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | python3-restrictedpython | deb | noble | 6.2-1ubuntu0.24.04.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | restrictedpython | deb | pro | 4.0~b3-3ubuntu0.1~esm1 | Not reported | UBUNTU-CVE-2023-41039 | Not reported |
Notes
[bookworm] restrictedpython: Minor issue
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
References
- [https://osv.dev/vulnerability/DEBIAN-CVE-2023-41039]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2023-41039]
- [https://security-tracker.debian.org/tracker/CVE-2023-41039]
- [https://ubuntu.com/security/notices/USN-7355-1]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Ubuntu Security Notices (USN)]