Advisory record · GHSA-wqc8-x2pr-7jqh

RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape

CVSS 8.4 HighEPSS 0.0085 · 58th percentile

Published by the GitHub Advisory Database at 10 Jul 2023, 21:53 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
restrictedpythonPyPI<5.3 || >=6.0a1.dev0, <6.1 || <5.35.3, 6.1
Identifiers
GHSA-wqc8-x2pr-7jqh · CVE-2023-37271 · PYSEC-2023-118
Weakness (CWE)
CWE-913
Published
10 Jul 2023
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

RestrictedPython versions before 5.3, and from 6.0a1.dev0 up to but not including 6.1, do not check access to stack frames and their attributes. An attacker who can write code in a RestrictedPython environment can use a generator to walk the stack beyond the sandbox boundary and run unrestricted Python code. Upgrade to restrictedpython 5.3 or 6.1. The source lists no workaround other than limiting the environment to trusted users.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
8.4 High 3.1 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0085, the 58th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 31 Oct 2026, 14:36 UTC First seen by agentprime
  2. 31 Oct 2026, 14:36 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.