CVE-2023-37271 | 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.

公開: 2023-07-11 最終更新: 2026-06-17 Assigner: [email protected] ソース: [email protected]

総合評価: CVE-2023-37271 は中リスク(51.8/100)。CVSS 深刻度は高。悪用される可能性が高い(EPSS 0.77%、51 パーセンタイル) 推奨対応: 影響資産を整理し、修補計画に組み込んでください。

リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。

CVE-2023-37271 の EPSS(Exploit Prediction Scoring System)スコア

EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。

# 日付 旧 EPSS スコア 新 EPSS スコア Δ(新 − 旧)
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%

EPSS の全履歴 (全 12 件)

CVE-2023-37271 の CVSS(Common Vulnerability Scoring System)指標

この CVE の CVSS 指標。

ベーススコア バージョン 深刻度 ベクトル 悪用しやすさ 影響 スコアの出典
8.4 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L クリックして展開
攻撃ベクター (AV:N)
インターネットなど、ルーティングされたネットワーク越しに遠隔から悪用しうる。端末の前にいる必要はない。
攻撃の複雑さ (AC:H)
到達できても、タイミング・負荷・周辺設定など、揃わないと成功しない局面が多い。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:N)
メールのリンクを開く、マクロを有効にするなど、被害者の協力がなくても成立しうる。
スコープ (S:C)
脆弱箇所を足がかりに、別コンポーネントや別権限域まで影響が広がりうる。
機密性への影響 (C:H)
広範な機微データの読み取りや持ち出しが現実的。
完全性への影響 (I:H)
権限の奪取や広範なログ改竄など、システムの信頼根拠を揺るがす改ざんが現実的。
可用性への影響 (A:L)
遅延や一部機能の停止、断続的な障害など、運用で吸収しうる範囲。
1.8 6.0 [email protected]
9.9 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H クリックして展開
攻撃ベクター (AV:N)
インターネットなど、ルーティングされたネットワーク越しに遠隔から悪用しうる。端末の前にいる必要はない。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:N)
メールのリンクを開く、マクロを有効にするなど、被害者の協力がなくても成立しうる。
スコープ (S:C)
脆弱箇所を足がかりに、別コンポーネントや別権限域まで影響が広がりうる。
機密性への影響 (C:H)
広範な機微データの読み取りや持ち出しが現実的。
完全性への影響 (I:H)
権限の奪取や広範なログ改竄など、システムの信頼根拠を揺るがす改ざんが現実的。
可用性への影響 (A:H)
長時間のサービス停止、データ損壊による復旧不能に近い状態など、利用者に著しい不便を与えうる。
3.1 6.0 [email protected]

CVE-2023-37271 の弱点分類(列挙)

CVE-2023-37271 の GitHub Security Advisory

GHSA-wqc8-x2pr-7jqh · 深刻度: high · エコシステム: pip — RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape

CVE-2023-37271 の OS トラッカー

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

CVE-2023-37271 の影響を受けるソフトウェア/構成

ベンダー 製品 バージョン 生の 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:*:*:*:*:*:*

CVE-2023-37271 の参考情報

cvelogic Threat Intelligence