CVE-2025-22153
HIGH 7.9CVSS 3.1try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
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.
- Published
- 23 Jan 2025
- Last modified
- 7 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-843
- Also known as
- GHSA-gmj9-h825-chq2PYSEC-2026-1874
- Sources
- NVDJSONOSV GHSA-gmj9-h825-chq2JSONOSV PYSEC-2026-1874JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | 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 |
| OSV | GitHub | 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 |
| OSV | PyPA | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | restrictedpython | >= 6.0, < 8.0 | 8.0 |
References
- https://github.com/zopefoundation/RestrictedPython/commit/48a92c5bb617a647cffd0dadd4d5cfe626bcdb2f · WEB
- 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 · PACKAGE
- https://pypi.org/project/restrictedpython · PACKAGE
- https://github.com/advisories/GHSA-gmj9-h825-chq2 · ADVISORY
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 23 Jan 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 23 Jan 2025)