CVE-2025-22153 Details
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.
A vulnerability in RestrictedPython versions 6.0 through 8.0 allows for sandbox escape by exploiting a type confusion bug in the CPython interpreter. This issue arises when using 'try/except*' clauses, creating a potential bypass of the restrictions that RestrictedPython is designed to enforce. The vulnerability is present in CPython versions 3.11 and prior to 3.13.2.
Users can upgrade to RestrictedPython version 8.0, which removes support for 'try/except*' clauses, addressing the vulnerability by preventing the exploitation method.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jan 23, 2025CISA-ADP
Assessed Jan 23, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/zopefoundation/RestrictedPython/commit/48a92c5bb617a647cffd0dadd4d5cfe626bcdb2f | [email protected] | Source CodeVendor |
| https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-gmj9-h825-chq2 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-843 | Access of Resource Using Incompatible Type ('Type Confusion') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Python | All versions |
CPE
Remediation
| |
| zopefoundation RestrictedPython | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 23, 2025 | New CVE Received | [email protected] |
Volerion