CVE-2025-22153
RestrictedPython is a tool that helps to define a subset of the …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/zopefoundation/RestrictedPython/commit/48a92c5bb617a647cffd0dadd4d5cfe626bcdb2f
- github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-gmj9-h825-chq2
- nvd.nist.gov/vuln/detail/CVE-2025-22153
- github.com/advisories/GHSA-gmj9-h825-chq2
- nvd.nist.gov/vuln/detail/CVE-2025-22153
- cve.org/CVERecord?id=CVE-2025-22153
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.