GHSA-wqc8-x2pr-7jqh · Severity: high · Ecosystem: pip — RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape
RestrictedPython is a tool that helps to define a subset of the Python language which allows users to provide a program input into a trusted environment. RestrictedPython does not check access to stack frames and their attributes. Stack frames are accessible within at least generators and generator expressions, which are allowed inside RestrictedPython. Prior to versions 6.1 and 5.3, an attacker with access to a RestrictedPython environment can write code that gets the current stack frame in a generator and then walk the stack all the way beyond the RestrictedPython invocation boundary, thus breaking out of the restricted sandbox and potentially allowing arbitrary code execution in the Python interpreter. All RestrictedPython deployments that allow untrusted users to write Python code in the RestrictedPython environment are at risk. In terms of Zope and Plone, this would mean deployments where the administrator allows untrusted users to create and/or edit objects of type `Script (Python)`, `DTML Method`, `DTML Document` or `Zope Page Template`. This is a non-default configuration and likely to be extremely rare. The problem has been fixed in versions 6.1 and 5.3.
Conclusion & alert: CVE-2023-37271 is rated Moderate Risk (51.8/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.77%). Mandatory action: Review affected assets and schedule remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.31% | 0.77% | +0.46% |
| 2 | 2026-04-05 | 0.23% | 0.31% | +0.08% |
| 3 | 2025-11-21 | — | 0.23% | — |
Full EPSS history (12 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 8.4 | 3.1 | HIGH |
|
1.8 | 6.0 | [email protected] |
| 9.9 | 3.1 | CRITICAL |
|
3.1 | 6.0 | [email protected] |
GHSA-wqc8-x2pr-7jqh · Severity: high · Ecosystem: pip — RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
not yet assigned | CVE-2023-37271 not yet assigned priority: Debian including 1 source packages (restrictedpython), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 3, open 2. | https://security-tracker.debian.org/tracker/CVE-2023-37271 |
ubuntu
|
medium | CVE-2023-37271 medium priority: Ubuntu including 1 source packages (restrictedpython), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 6, ignored 4, released 3. | https://ubuntu.com/security/CVE-2023-37271 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| zope | restrictedpython | < 5.3 | cpe:2.3:a:zope:restrictedpython:*:*:*:*:*:*:*:* |
| zope | restrictedpython | 6.0 | cpe:2.3:a:zope:restrictedpython:6.0:-:*:*:*:*:*:* |
| zope | restrictedpython | 6.0 | cpe:2.3:a:zope:restrictedpython:6.0:a1.dev0:*:*:*:*:*:* |