CVE-2024-47532
RestrictedPython information leakage via `AttributeError.obj` and the `string` module
Reported by github_m · Published September 30, 2024
restrictedpython is fixed in d701cc36cccac36b21fa200f1f2d1945a9a215e6 and 7.3 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| restrictedpython | PyPI | d701cc36cccac36b21fa200f1f2d1945a9a215e6, 7.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| zopefoundation | RestrictedPython | < 7.3 |
| PyPI | RestrictedPython | 0 |
| zopefoundation | RestrictedPython | 0 |
| zope | restrictedpython | 0 |
Timeline
- Sep 30, 2024 CVE Published
- Sep 30, 2024 PoC Published (2 in total, the first dated here)
- Oct 1, 2024 EPSS Score (30 in total, the first dated here)
- Oct 5, 2024 Coalition ESS Score (7 in total, the first dated here)
- Nov 15, 2024 CVE Updated
- Jan 4, 2026 Security Advisory
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-47532
vulnetix vdb fixes CVE-2024-47532
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-47532/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-5rfv-66g4-jr8h x_refsource_CONFIRM
- https://github.com/zopefoundation/RestrictedPython/commit/d701cc36cccac36b21fa200f1f2d1945a9a215e6 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2024-47532 advisory
- https://github.com/advisories/GHSA-5rfv-66g4-jr8h advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/restrictedpython/PYSEC-2024-186.yaml advisory
- https://github.com/zopefoundation/RestrictedPython url