CVE-2025-22153: try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
Vulnerability summary
CVE-2025-22153 is a high (CVSS 7.9) vulnerability in zopefoundation restrictedpython. EPSS estimates a 0.40% chance of exploitation in the next 30 days, higher than 34.2% of scored vulnerabilities.
Not severe (CVSS 7.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 23-01-2025PublishedVulnerability first disclosed.
- 12-02-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · PypiEcosystem advisory · calculated7.9HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
- OSV · UbuntuEcosystem advisory · calculated7.9HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
- OSV · DebianEcosystem advisory · calculated7.9HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
- NVDNIST7.9HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L
EPSS trend
Probability
0.40%
Chance of exploitation in the next 30 days
Percentile
34%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.40% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, administrative account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- restrictedpython< 8.0-1
PyPI1 product
- restrictedpython≥ 6.0, < 8.0
Ubuntu1 product
- restrictedpython< 6.2-1ubuntu0.24.04.1~esm1
Zopefoundation1 product
- restrictedpython≥ 6.0, < 8.0
4 vendors · 4 products
References
10 links- github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-gmj9-h825-chq2X Refsource CONFIRMWEBREPORT