GHSA-gmj9-h825-chq2

Suggest an improvement
Source
https://github.com/advisories/GHSA-gmj9-h825-chq2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/01/GHSA-gmj9-h825-chq2/GHSA-gmj9-h825-chq2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-gmj9-h825-chq2
Aliases
Published
2025-01-23T17:19:34Z
Modified
2025-01-23T23:28:04.551166Z
Severity
  • 7.9 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L CVSS Calculator
Summary
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
Details

Impact

Via a type confusion bug in the CPython interpreter when using try/except* RestrictedPython could be bypassed.

We believe this should be fixed upstream in Python itself until that we remove support for try/except* from RestrictedPython. (It has been fixed for some Python versions.)

Patches

Patched in version 8.0 by removing support for try/except* clauses

Workarounds

There is no workaround.

References

none

Database specific
{
    "nvd_published_at": "2025-01-23T18:15:33Z",
    "cwe_ids": [
        "CWE-843"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2025-01-23T17:19:34Z"
}
References

Affected packages

PyPI / restrictedpython

Package

Name
restrictedpython
View open source insights on deps.dev
Purl
pkg:pypi/restrictedpython

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0
Fixed
8.0

Affected versions

6.*

6.0
6.1
6.2

7.*

7.0a1.dev0
7.0a1.dev1
7.0a2.dev0
7.0
7.1
7.2a1.dev0
7.2
7.3
7.4