# CVE-2026-55830: RestrictedPython guard hooks can be shadowed via positional-only arguments

> Attackers can bypass RestrictedPython access policies by shadowing guard hooks using positional-only arguments, potentially escaping the sandbox.

- **Severity:** High 8.3 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 Jul 2026
- **Updated:** 9 Jul 2026
- **Also known as:** CLEANSTART-2026-OY92874, DEBIAN-CVE-2026-55830, ECHO-e362-8d35-27d4, GHSA-ffg3-p8fm-mjx2, MINI-2p37-hfgr-f523, MINI-43g3-7gv6-v29r, MINI-89fv-v96r-qq6c, MINI-gq4h-fhcq-2m28, MINI-jjvq-7m2j-2w26, MINI-rpwc-9p5c-hh66, MINI-wx4r-4cv8-83qm, PYSEC-2026-3917, UBUNTU-CVE-2026-55830

## What is CVE-2026-55830?

CVE-2026-55830 is a high-severity vulnerability in zopefoundation RestrictedPython, published on 8 Jul 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official 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. Prior to 8.3, check_function_argument_names() rejected protected guard hook names for regular, variadic, and keyword-only arguments but omitted positional-only arguments, allowing __getattr__, _getitem_, _write_, or _print_ to be shadowed by a local parameter and bypass the embedding application's access policy. This issue is fixed in version 8.3.

Weakness: CWE-184 (Incomplete List of Disallowed Inputs)

## Which versions are affected by CVE-2026-55830?

3 open source packages ship an affected version, including restrictedpython and RestrictedPython.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `restrictedpython` | PyPI | All versions | 8.3 |
| `restrictedpython` | PyPI | All versions | 8.3 |
| `RestrictedPython` | PyPI | All versions | 8.3 |

## How do I fix CVE-2026-55830?

Upgrade restrictedpython to 8.3 or later.

## Is CVE-2026-55830 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55830 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55830 and fix it if it is affected.

What it is: CVE-2026-55830 is a high-severity vulnerability in zopefoundation RestrictedPython, published on 8 Jul 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55830 exists.

Affected packages and fixed versions:
- restrictedpython (PyPI): affected all versions; fixed in 8.3
- restrictedpython (PyPI): affected all versions; fixed in 8.3
- RestrictedPython (PyPI): affected all versions; fixed in 8.3

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-55830/ (Markdown: https://insights.sbomify.com/CVE-2026-55830/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-55830
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-55830
- OSV: https://osv.dev/vulnerability/CVE-2026-55830

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-55830/
Summaries are generated and may contain mistakes; the official description above is the record.
