{"id":"CVE-2024-47532","aliases":["DEBIAN-CVE-2024-47532","EUVD-2024-0156","GHSA-5rfv-66g4-jr8h","PYSEC-2024-186","UBUNTU-CVE-2024-47532","USN-7355-1"],"status":"published","title":"RestrictedPython information leakage via `AttributeError.obj` and the `string` module","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.","severity":{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00716,"percentile":0.54113,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200"],"published":"2024-09-30T15:29:57Z","modified":"2026-11-02T12:02:51Z","fixes":[{"ecosystem":"PyPI","package":"restrictedpython","fixed_in":["7.3"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"restrictedpython","fixed_in":["8.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"restrictedpython","fixed_in":["8.0-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"restrictedpython","fixed_in":["4.0~b3-2ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"restrictedpython","fixed_in":["4.0~b3-3ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:24.04:LTS","package":"restrictedpython","fixed_in":["6.2-1ubuntu0.24.04.1~esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.0~b3-3","6.2-1","8.0-1","8.1-1","8.4-1"]},{"source":"osv","ecosystem":"Debian:13","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.0-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.3"}]}],"versions":["3.4.2","3.4.3","3.5.0","3.5.1","3.5.2","3.6.0","3.6.0a1","4.0","4.0a1","4.0a2","4.0a3","4.0b1","4.0b2","4.0b3","4.0b4","4.0b5","4.0b6","4.0b7","4.0b8","5.0","5.1","5.2","5.2a1.dev0","5.3","5.3a1.dev0","5.4","6.0","6.0a1.dev0","6.1","6.2","7.0","7.0a1.dev0","7.0a1.dev1","7.0a2.dev0","7.1","7.2","7.2a1.dev0"]},{"source":"osv","ecosystem":"PyPI","package":"restrictedpython","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"d701cc36cccac36b21fa200f1f2d1945a9a215e6"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.3"}]}],"versions":["3.4.2","3.4.3","3.5.0","3.5.1","3.5.2","3.6.0","3.6.0a1","4.0","4.0a1","4.0a2","4.0a3","4.0b1","4.0b2","4.0b3","4.0b4","4.0b5","4.0b6","4.0b7","4.0b8","5.0","5.1","5.2","5.2a1.dev0","5.3","5.3a1.dev0","5.4","6.0","6.0a1.dev0","6.1","6.2","7.0","7.0a1.dev0","7.0a1.dev1","7.0a2.dev0","7.1","7.2","7.2a1.dev0"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0~b3-2ubuntu0.1~esm1"}]}],"versions":["4.0~b3-2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0~b3-3ubuntu0.1~esm1"}]}],"versions":["4.0~b3-2","4.0~b3-2ubuntu1","4.0~b3-3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2-1ubuntu0.24.04.1~esm1"}]}],"versions":["4.0~b3-3","6.2-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0~b3-2ubuntu0.1~esm1"}]}],"versions":["4.0~b3-2"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0~b3-3ubuntu0.1~esm1"}]}],"versions":["4.0~b3-2","4.0~b3-2ubuntu1","4.0~b3-3"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"restrictedpython","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2-1ubuntu0.24.04.1~esm1"}]}],"versions":["4.0~b3-3","6.2-1"],"bundled":4}],"products":[{"vendor":"zope","product":"restrictedpython"},{"vendor":"zopefoundation","product":"restrictedpython"}],"references":[{"url":"https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-5rfv-66g4-jr8h","tags":["x_refsource_CONFIRM","Exploit","Mitigation","Vendor Advisory","advisory","web","evidence","report"]},{"url":"https://github.com/zopefoundation/RestrictedPython/commit/d701cc36cccac36b21fa200f1f2d1945a9a215e6","tags":["x_refsource_MISC","Patch","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47532","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/restrictedpython/PYSEC-2024-186.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-5rfv-66g4-jr8h"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47532.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-47532","tags":["advisory"]},{"url":"https://github.com/zopefoundation/RestrictedPython","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-47532","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-47532","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7355-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2023-37271","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-41039","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2025-22153","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-47532","title":"RestrictedPython information leakage via `AttributeError.obj` and the `string` module","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.","status":"published","published":"2024-09-30T15:29:57.907Z","modified":"2024-09-30T17:29:29.522Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:33:57.638551Z"}],"euvd":[{"id":"EUVD-2024-0156","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.","status":"published","published":"2024-09-30T15:29:57Z","modified":"2024-09-30T17:29:29Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-03T00:28:02.402482Z"}],"ghsa":[{"id":"GHSA-5rfv-66g4-jr8h","title":"RestrictedPython information leakage via `AttributeError.obj` and the `string` module","description":"### Impact\nA user can gain access to protected (and potentially sensible) information indirectly via `AttributeError.obj` and the `string` module.\n\n### Patches\nThe problem will be fixed in version 7.3.\n\n\n### Workarounds\nIf 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.\n","status":"published","published":"2024-09-30T17:14:00Z","modified":"2025-01-21T17:59:47Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:38:27.974809Z"}],"nvd":[{"id":"CVE-2024-47532","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.","status":"published","published":"2024-09-30T16:15:09.96Z","modified":"2026-06-17T07:57:15.22Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:10:29.044588Z"}],"osv":[{"id":"CVE-2024-47532","title":"RestrictedPython information leakage via `AttributeError.obj` and the `string` module","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.","status":"published","published":"2024-09-30T15:29:57.907Z","modified":"2026-10-28T02:31:00.928246346Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:44:43.253252Z"},{"id":"DEBIAN-CVE-2024-47532","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.","status":"published","published":"2024-09-30T16:15:09.96Z","modified":"2026-11-02T12:02:51.060795999Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:43.798789Z"},{"id":"GHSA-5rfv-66g4-jr8h","title":"RestrictedPython information leakage via `AttributeError.obj` and the `string` module","description":"### Impact\nA user can gain access to protected (and potentially sensible) information indirectly via `AttributeError.obj` and the `string` module.\n\n### Patches\nThe problem will be fixed in version 7.3.\n\n\n### Workarounds\nIf 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.\n","status":"published","published":"2024-09-30T17:14:00Z","modified":"2025-01-21T18:21:23.819184Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:46:38.911014Z"},{"id":"PYSEC-2024-186","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.","status":"published","published":"2024-09-30T16:15:09Z","modified":"2025-01-19T04:56:54.776821Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:52:53.837392Z"},{"id":"UBUNTU-CVE-2024-47532","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.","status":"published","published":"2024-09-30T16:15:00Z","modified":"2026-02-04T03:20:36.07209Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T16:55:02.636559Z"},{"id":"USN-7355-1","title":"restrictedpython vulnerabilities","description":"Nakul Choudhary and Robert Xiao discovered that RestrictedPython did not\nproperly sanitize certain inputs. An attacker could possibly use this\nissue to execute arbitrary code. This issue only affected\nUbuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2023-37271)\n\nAbhishek Govindarasu, Ankush Menat and Ward Theunisse discovered that\nRestrictedPython did not correctly handle certain format strings. An\nattacker could possibly use this issue to leak sensitive information.\nThis issue only affected Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.\n(CVE-2023-41039)\n\nIt was discovered that RestrictedPython did not correctly restrict access\nto certain fields. An attacker could possibly use this issue to leak\nsensitive information. (CVE-2024-47532)\n\nIt was discovered that RestrictedPython contained a type confusion\nvulnerability. An attacker could possibly use this issue to execute\narbitrary code. This issue only affected Ubuntu 24.04 LTS and\nUbuntu 24.10. (CVE-2025-22153)\n","status":"published","published":"2025-03-18T23:59:57Z","modified":"2026-04-27T17:48:50.897198Z","updated_at":"2026-11-02T16:58:19.988474Z"}]}}
