CVE-2025-22153
Python vulnerability analysis and mitigation

Overview

RestrictedPython, a tool designed to define a subset of the Python language for providing program input in a trusted environment, was found to contain a critical security vulnerability (CVE-2025-22153) discovered on January 23, 2025. The vulnerability affects versions starting from 6.0 and prior to version 8.0, specifically when using try/except* functionality in Python versions 3.11 through 3.13.2 (GitHub Advisory).

Technical details

The vulnerability stems from a type confusion bug in the CPython interpreter when using try/except* clauses, which could lead to a sandbox escape. The issue has been assigned a CVSS v3.1 base score of 7.9 (High) with the vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L, indicating network attack vector, high attack complexity, high privileges required, no user interaction needed, changed scope, and high impact on confidentiality and integrity with low impact on availability (NVD).

Impact

The vulnerability allows attackers to bypass RestrictedPython's security restrictions, potentially leading to unauthorized code execution and sandbox escape. This could compromise the integrity of the trusted environment that RestrictedPython is designed to maintain (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in RestrictedPython version 8.0 by completely removing support for try/except* clauses. Additionally, ExceptionGroup has been removed from safe_builtins as it is only useful with try/except*. No alternative workarounds are available, making upgrading to version 8.0 the only solution (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22871HIGH8.7
  • PythonPython
  • guarddog
NoYesJan 13, 2026
GHSA-58pv-8j8x-9vj2HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 13, 2026
CVE-2026-22779MEDIUM6.3
  • PythonPython
  • blacksheep
NoYesJan 14, 2026
CVE-2026-21889LOW2.3
  • PythonPython
  • weblate
NoYesJan 14, 2026
CVE-2025-68492LOW2.3
  • PythonPython
  • chainlit
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management