CVE-2025-22153
published high CVSS 3.1 · 7.9try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| zopefoundation | — | RestrictedPython>= 6.0, < 8.0 | Affected | Not stated | GitHub_M |
| Ubuntu | noble | python3-restrictedpython | Advisory build | 6.2-1ubuntu0.24.04.1~esm1 | USN-7355-1 |
| Ubuntu | noble | restrictedpython | Advisory build | 6.2-1ubuntu0.24.04.1~esm1 | USN-7355-1 |
Description
RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted environment. Via a type confusion bug in versions of the CPython interpreter starting in 3.11 and prior to 3.13.2 when using `try/except*`, RestrictedPython starting in version 6.0 and prior to version 8.0 could be bypassed. The issue is patched in version 8.0 of RestrictedPython by removing support for `try/except*` clauses. No known workarounds are available.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.9 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| zopefoundation | RestrictedPython | >= 6.0, < 8.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-843 CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
References
2Provider assertions
2GitHub_M · cna
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 051975a3f30a70433126dadbb044f238f361fd7dbd9b3ee568b7b0090ceca38a
- Ingested
- 23 Sep 2026, 08:40:04 UTC
- Source record
- Official CVE record