HIGH7.9
PYSEC-2026-1874
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
Quick fix
PYSEC-2026-1874 — restrictedpython: upgrade to the fixed version with the command below.
pip install --upgrade 'restrictedpython>=8.0'Details
### 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
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/restrictedpython
Introduced in:
6.0Fixed in: 8.0Fix
pip install --upgrade 'restrictedpython>=8.0'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]
- https://pypi.org/project/restrictedpython[PACKAGE]
- https://github.com/advisories/GHSA-gmj9-h825-chq2[ADVISORY]