try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter

GHSA-gmj9-h825-chq2
HIGH 7.9OSV

At a glance

Source
OSV
Published
Updated
CVE
CVE-2025-22153
Aliases
PYSEC-2026-1874
CVSS_V3
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
CVE severity
HIGH 7.9 · CVE-2025-22153

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

References

Affected packages

PackageVersions
PyPI · restrictedpythonintroduced 6.0, fixed 8.0

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database