{"answers":{"affected":"3 open source packages ship an affected version, including restrictedpython and RestrictedPython.","exploited":"There is no known exploitation of CVE-2025-22153 in the wild and no public exploit code.","fix":"Upgrade restrictedpython to 8.0 or later.","what":"CVE-2025-22153 is a high-severity vulnerability in zopefoundation RestrictedPython, published on 23 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-22153 and fix it if it is affected.\n\nWhat it is: CVE-2025-22153 is a high-severity vulnerability in zopefoundation RestrictedPython, published on 23 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-22153 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- restrictedpython (PyPI): affected from 6.0; fixed in 8.0\n- restrictedpython (PyPI): affected from 6.0; fixed in 8.0\n- RestrictedPython (PyPI): affected from 6.0; fixed in 8.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-22153/ (Markdown: https://insights.sbomify.com/CVE-2025-22153/index.md)","id":"CVE-2025-22153","markdown":"https://insights.sbomify.com/CVE-2025-22153/index.md","name":"CVE-2025-22153","record":{"aliases":["DEBIAN-CVE-2025-22153","GHSA-gmj9-h825-chq2","PYSEC-2026-1874","UBUNTU-CVE-2025-22153"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Python sandboxing library","requires_auth":"high_privilege","summary":"A type confusion bug in CPython allows attackers to bypass RestrictedPython sandbox restrictions, potentially executing unauthorized code.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.9,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"}],"description":"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter","id":"CVE-2025-22153","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"To maintain compliance with CNA rules, we have rejected this CVE record because it has not been used.","id":"CVE-2025-22154"},"packages":[{"ecosystem":"PyPI","fixed":["8.0"],"introduced":["6.0"],"last_affected":[],"package":"RestrictedPython","purl":null,"source":"GHSA-gmj9-h825-chq2"},{"ecosystem":"PyPI","fixed":["8.0"],"introduced":["6.0"],"last_affected":[],"package":"restrictedpython","purl":"pkg:pypi/restrictedpython","source":"GHSA-gmj9-h825-chq2"},{"ecosystem":"PyPI","fixed":["8.0"],"introduced":["6.0"],"last_affected":[],"package":"restrictedpython","purl":"pkg:pypi/restrictedpython","source":"PYSEC-2026-1874"}],"prev":{"headline":"Improper Path Validation Enables Path Traversal in Multiple Components in Atheos","id":"CVE-2025-22152"},"products":["RestrictedPython"],"published":"2025-01-23","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-12","vendors":["zopefoundation"]},"summary":"A type confusion bug in CPython allows attackers to bypass RestrictedPython sandbox restrictions, potentially executing unauthorized code.","url":"https://insights.sbomify.com/CVE-2025-22153/"}