Access of Resource Using Incompatible Type ('Type Confusion') Affecting restrictedpython package, versions [6.0,8.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-RESTRICTEDPYTHON-8660824
  • published24 Jan 2025
  • disclosed23 Jan 2025
  • creditNico-Posada

Introduced: 23 Jan 2025

NewCVE-2025-22153  (opens in a new tab)
CWE-843  (opens in a new tab)

How to fix?

Upgrade RestrictedPython to version 8.0 or higher.

Overview

RestrictedPython is a RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment.

Affected versions of this package are vulnerable to Access of Resource Using Incompatible Type ('Type Confusion') due to a type confusion bug in the CPython interpreter. An attacker can bypass security restrictions by exploiting the try/except* clauses. This is only exploitable if the try/except* feature is used in the code.

CVSS Scores

version 4.0
version 3.1