Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2023-37271— RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape

Quick assessment

Affected
zopefoundation RestrictedPython
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

RestrictedPython是一个帮助定义 Python 语言子集的工具,该子集允许将程序输入提供到受信任的环境中。 RestrictedPython 5.3之前版本、6.1之前版本存在安全漏洞,该漏洞源于允许用户向受信任的环境提供程序输入,但 RestrictedPython 不检查对堆栈帧及其属性的访问,攻击者利用该漏洞可以在Python解释器中执行任意代码。

CVSS 8.4 · High EPSS 0.85% · P57
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2023-37271

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
Source: CVE Program / CVE List V5
Vulnerability Type
动态管理代码资源的控制不恰当
Source: CVE Program / CVE List V5
Vulnerability Title
RestrictedPython 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
RestrictedPython是一个帮助定义 Python 语言子集的工具,该子集允许将程序输入提供到受信任的环境中。 RestrictedPython 5.3之前版本、6.1之前版本存在安全漏洞,该漏洞源于允许用户向受信任的环境提供程序输入,但 RestrictedPython 不检查对堆栈帧及其属性的访问,攻击者利用该漏洞可以在Python解释器中执行任意代码。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
zopefoundation RestrictedPython >= 6.0a1.dev0, < 6.1 -

II. Public POCs for CVE-2023-37271

# POC Description Source Link Shenlong Link
AI-Generated POC Verified env Premium
Qwen3.6-35B-A3B · 8475 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2023-37271

请登录查看更多情报信息。

Patches & Fixes for CVE-2023-37271 (1)

Vendor Advisories for CVE-2023-37271 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2023-37271

No comments yet


Leave a comment