SCA: security update for RestrictedPython, restrictedpython (GHSA-wqc8-x2pr-7jqh)

critical Tenable Cloud Security Plugin ID 420070

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

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

See Also

https://github.com/advisories/GHSA-wqc8-x2pr-7jqh

Plugin Details

Severity: Critical

ID: 420070

Version: Revision 1.13

Type: Local

Family: SCA Checks

Published: 1/23/2025

Updated: 7/2/2026

Supported Sensors: Tenable Cloud Security, Tenable Self-Hosted Container Security

Risk Information

VPR

Risk Factor: Medium

Score: 5

Percentile: 94.66

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: High

Base Score: 9

Temporal Score: 6.7

Vector: CVSS2#AV:N/AC:L/Au:S/C:C/I:C/A:C

CVSS Score Source: CVE-2023-37271

CVSS v3

Risk Factor: Critical

Base Score: 9.9

Temporal Score: 8.6

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

Exploit Ease: No known exploits are available

Patch Publication Date: 7/10/2023

Vulnerability Publication Date: 7/10/2023

Reference Information

CVE: CVE-2023-37271

cwe: CWE-913