Description
RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted environment. Prior to 8.3, check_function_argument_names() rejected protected guard hook names for regular, variadic, and keyword-only arguments but omitted positional-only arguments, allowing __getattr__, _getitem_, _write_, or _print_ to be shadowed by a local parameter and bypass the embedding application's access policy. This issue is fixed in version 8.3.
Published: 2026-07-08
Score: 8.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

allows code supplied to the interpreter to shadow built‑in guard hooks via positional‑only arguments. This bypasses the embedding application's access policy, permitting execution of arbitrary code within the trusted sandbox. The flaw arises from the check_function_argument_names() function failing to reject forbidden hook names when they appear as positional‑only arguments, a weakness identified as CWE‑184. Consequently, any user input that defines such functions can override.

Affected Systems

Affected versions are all releases of the Zope Foundation RestrictedPython product older than 8.3, including 8.2 and earlier deployed in a variety of web applications and data‑processing pipelines that rely on RestrictedPython for sandboxing third‑party code. The problem is not confined to a particular operating system; any environment executing RestrictedPython may be impacted.

Risk and Exploitability

The CVSS score is 8.3, indicating high severity. The EPSS score is < 1%, so the current estimated exploit likelihood is very low, but the absence of a KEV listing means no widespread exploitation has been reported to CISA yet. Based on the description, the attack vector is inferred to be local, requiring an adversary to supply crafted Python code to the RestrictedPython interpreter. If the application accepts untrusted input, the threat is significant, as the attacker can bypass the sandbox and run native or arbitrary code within the host process.

Generated by OpenCVE AI on July 26, 2026 at 16:46 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the version 8.3 or later, which contains a fix that rejects positional‑only guard hook names.
  • Audit all user‑supplied code paths in your application to ensure that no functions with positional‑only arguments can be executed in a context where RestrictedPython enforces guard hooks; refactor or remove such arguments.
  • Disable or tightly restrict the use of guard hooks in application code, ensuring that only trusted code can modify access policies.

Generated by OpenCVE AI on July 26, 2026 at 16:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 09 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Zope
Zope restrictedpython
Vendors & Products Zope
Zope restrictedpython

Wed, 08 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
Description RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted environment. Prior to 8.3, check_function_argument_names() rejected protected guard hook names for regular, variadic, and keyword-only arguments but omitted positional-only arguments, allowing __getattr__, _getitem_, _write_, or _print_ to be shadowed by a local parameter and bypass the embedding application's access policy. This issue is fixed in version 8.3.
Title RestrictedPython guard hooks can be shadowed via positional-only arguments
Weaknesses CWE-184
References
Metrics cvssV3_1

{'score': 8.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:L'}


Subscriptions

Zope Restrictedpython
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T13:46:21.968Z

Reserved: 2026-06-17T16:29:38.864Z

Link: CVE-2026-55830

cve-icon Vulnrichment

Updated: 2026-07-09T13:46:18.983Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:00:14Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs