try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter (zopefoundation RestrictedPython)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.40 % · percentile 36 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- Affected products
- zopefoundation · RestrictedPython
- NVD status
- Deferred
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.
Weaknesses (CWE)
- CWE-843 — Access of Resource Using Incompatible Type
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 7.9 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L | GitHub_M |
| CVSS 3.1 | HIGH 7.9 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-gmj9-h825-chq2 — try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
- PYSEC-2026-1874 — try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
European references
- ENISA EUVD · EUVD-2025-0162
- GCVE · GCVE-0-2025-22153
Affected products
| Product | Affected versions |
|---|---|
| zopefoundation · RestrictedPython | affected : >= 6.0, < 8.0 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |