CVE-2024-47532: RestrictedPython is a restricted execution environment for Python to run untrusted code
Affects restrictedpythonSource GCVE Database
Not known to be exploited · CVSS 6.5 Medium · fixed in 4.0~b3-2ubuntu0.1~esm1 : update restrictedpython when convenient.
Data as of 24 Nov 2026, 19:40 UTC
- Patch
- Available – fixed in 4.0~b3-2ubuntu0.1~esm1, 4.0~b3-3ubuntu0.1~esm1, 6.2-1ubuntu0.24.04.1~esm1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 30 Sep 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Upgrade the Ubuntu restrictedpython to 4.0~b3-2ubuntu0.1~esm1 (package) or 4.0~b3-3ubuntu0.1~esm1 (package) or 6.2-1ubuntu0.24.04.1~esm1 (package).
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu Pro 24.04 LTSrestrictedpythonpkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps/nobleOther threats | Affected
| Fixed in
|
Ubuntu Pro 22.04 LTSrestrictedpythonpkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps/jammyOther threats | Affected
| Fixed in
|
Ubuntu Pro 20.04 LTSrestrictedpythonpkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps/focalOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
RestrictedPython is a restricted execution environment for Python to run untrusted code. A user can gain access to protected (and potentially sensible) information indirectly via AttributeError.obj and the string module. The problem will be fixed in version 7.3. As a workaround, If the application does not require access to the module string, it can remove it from RestrictedPython.Utilities.utility_builtins or otherwise do not make it available in the restricted execution environment.
References
- ubuntu.com/security/CVE-2024-47532 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-47532 (opens in a new tab)
- github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-5rfv-66g4-jr8h (opens in a new tab)
- github.com/zopefoundation/RestrictedPython/commit/d701cc36cccac36b21fa200f1f2d1945a9a215e6 (opens in a new tab)
- ubuntu.com/security/notices/USN-7355-1 (opens in a new tab)