High severity · published Jan 23, 2025
CVE-2025-22153
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
7.9
CVSS
0.4%
EPSS
No
On KEV
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. Via a type confusion bug in versions of the CPython interpreter starting in 3.11 and prior to 3.13.2 when using `try/except*`, RestrictedPython starting in version 6.0 and prior to version 8.0 could be bypassed. The issue is patched in version 8.0 of RestrictedPython by removing support for `try/except*` clauses. No known workarounds are available.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
Attack vector
Network
Complexity
High
Privileges
High
User interaction
None
Confidentiality
High
Integrity
High
Availability
Low
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 34% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RE
RestrictedPython · zopefoundation
>= 6.0, < 8.0 · source: vendor
Affected product
RE
RestrictedPython
zopefoundation
More from RestrictedPython
9.9
CVE-2023-37271
RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape
8.4
CVE-2026-76825
RestrictedPython: Sandbox escape via string.Formatter field resolution
8.3
CVE-2026-55830
RestrictedPython guard hooks can be shadowed via positional-only arguments
7.7
CVE-2023-41039
Sandbox escape via various forms of "format" in RestrictedPython
6.5
CVE-2024-47532
RestrictedPython information leakage via `AttributeError.obj` and the `string` module