Access of Resource Using Incompatible Type ('Type Confusion') Affecting restrictedpython package, versions <6.2-1ubuntu0.24.10.1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.04% (12th percentile)

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 Learn

Learn about Access of Resource Using Incompatible Type ('Type Confusion') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU2410-RESTRICTEDPYTHON-8663332
  • published18 Mar 2025
  • disclosed23 Jan 2025

Introduced: 23 Jan 2025

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

How to fix?

Upgrade Ubuntu:24.10 restrictedpython to version 6.2-1ubuntu0.24.10.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream restrictedpython package and not the restrictedpython package as distributed by Ubuntu. See How to fix? for Ubuntu:24.10 relevant fixed versions and status.

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.