RestrictedPython information leakage via `AttributeError.obj` and the `string` module
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| zopefoundation | RestrictedPython | before 7.3 | 7.3 | Patch available | CNA |
| — | RestrictedPython (PyPI) | before 7.3 | 7.3 | Patch available | GHSA-5rfv-66g4-jr8h |
- RestrictedPython Vendorzopefoundation Affected before 7.3 Fixed in 7.3 Patch available CNA
- RestrictedPython (PyPI) Vendor— Affected before 7.3 Fixed in 7.3 Patch available GHSA-5rfv-66g4-jr8h
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:zope:restrictedpython:*:*:*:*:*:*:*:* | before 7.3 | Vulnerable | zopefoundation |
- cpe:2.3:a:zope:restrictedpython:*:*:*:*:*:*:*:* Versions before 7.3 Vulnerable ·zopefoundation
Remediation
- Fix · CNA RestrictedPython (zopefoundation) Fixed in 7.3
- Fix · GHSA-5rfv-66g4-jr8h RestrictedPython (PyPI) Fixed in 7.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-47532
- 2026-10-03 Alias added: GHSA-5rfv-66g4-jr8h
References
Patch 1
More zopefoundation Restrictedpython vulnerabilities
- TI-2023-18901 RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape CVSS 3.1CRITICAL 9.9
- TI-2023-21665 Sandbox escape via various forms of "format" in RestrictedPython CVSS 3.1HIGH 8.3
Sources
- CVE-2024-47532 · CVE Program
- CVE-2024-47532 · NVD
- FIRST EPSS
- GHSA-5rfv-66g4-jr8h · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences