CVE-2025-22153: try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
7.9
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.22773%
CWE
Published
1/23/2025
Updated
1/23/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| RestrictedPython | pip | >= 6.0, < 8.0 | 8.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key points: 1) The transformer allowed try/except* syntax (via visit_TryStar), and 2) ExceptionGroup was whitelisted in safe_builtins. The commit patching the vulnerability specifically modifies both - replacing visit_TryStar's permissive behavior with a denial, and removing ExceptionGroup from safe_builtins. These changes directly correlate with the described type confusion attack vector through try/except* handling in vulnerable Python versions (3.11+). The CWE-843 classification and commit message about 'sandbox escape' confirm these components were the entry points for exploitation.