GitHub Advisoryadvisory · PyPI
GHSA-gmj9-h825-chq2 try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
HIGH
Official page ↗
- Aliases
- CVE-2025-22153
- Ecosystem
- PyPI
- Packages
- RestrictedPython
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
- Weaknesses
- CWE-843
- Reviewed
- 2025-01-23
Affected packages
• PyPI RestrictedPython: >= 6.0, < 8.0 → fixed in 8.0
Description
Impact
Via a type confusion bug in the CPython interpreter when using `try/except*` RestrictedPython could be bypassed.
We believe this should be fixed upstream in Python itself until that we remove support for `try/except*` from RestrictedPython.
(It has been fixed for some Python versions.)
Patches
Patched in version 8.0 by removing support for `try/except*` clauses
Workarounds
There is no workaround.
References
none
Related
Alias · CVE (1)
- CVE-2025-22153 RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted… vulnerability
Weakness · CWE (1)
- CWE-843 Access of Resource Using Incompatible Type weakness
References
- https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-gmj9-h825-chq2 web
- https://nvd.nist.gov/vuln/detail/CVE-2025-22153 advisory
- https://github.com/zopefoundation/RestrictedPython/commit/48a92c5bb617a647cffd0dadd4d5cfe626bcdb2f web
- https://github.com/zopefoundation/RestrictedPython package