try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
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
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | restrictedpython | >= 6.0, < 8.0 | 8.0 |
References
- https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-gmj9-h825-chq2
- https://nvd.nist.gov/vuln/detail/CVE-2025-22153
- https://github.com/zopefoundation/RestrictedPython/commit/48a92c5bb617a647cffd0dadd4d5cfe626bcdb2f
- https://github.com/zopefoundation/RestrictedPython
- https://pypi.org/project/restrictedpython
- https://github.com/advisories/GHSA-gmj9-h825-chq2
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L- Weakness (CWE)
CWE-843- Platform
- Python (PyPI)
- Package
restrictedpython- Disclosed
- 23.01.2025
- Updated
- 11.10.2026 13:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1874 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-gmj9-h825-chq2 - CC BY 4.0
Vulnerability history: restrictedpython
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 6
- First → latest
- 07.2023 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 6
Disclosures per year
- 2023: 2
- 2024: 1
- 2025: 1
- 2026: 2
-
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.