CVE-2026-76825 RestrictedPython: Sandbox escape via string.Formatter field resolution
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- UbuntuDebian
Description
RestrictedPython is a tool that helps define a subset of the Python language for accepting program input in a trusted environment. Prior to 8.4, RestrictedPython could allow a sandbox escape when a custom import policy or globals exposed the standard library string module, the string.Formatter class, a Formatter instance, or a Formatter subclass to restricted code. The string.Formatter methods format, get_field, get_value, and vformat performed attribute and item traversal internally without passing through RestrictedPython's safer_getattr protections. Restricted code could use those live object references to reach function globals, builtins, file access, or code execution primitives, affecting confidentiality, integrity, and availability in the host environment. This issue is fixed in version 8.4.
Upgrade path
9 packages: 2 fixed, 6 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/restrictedpython(Debian 12) | = 4.0~b3-3; = 6.2-1; = 8.0-1; = 8.1-1 +2 more | No fix listed | No fix yet |
| debian/restrictedpython(Debian 13) | = 8.0-1; = 8.1-1; = 8.4-1; All versions | No fix listed | No fix yet |
| ubuntu/restrictedpython(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/restrictedpython(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/restrictedpython(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/restrictedpython(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/restrictedpython(Debian 14) | < 8.4-1; = 8.0-1; = 8.1-1 | 8.4-1 | Fixed |
| pypi restrictedpython(PyPI) | < 8.4; = 3.4.2; = 3.4.3; = 3.5.0 +42 more | 8.4 | Fixed |
| zopefoundation RestrictedPython | = < 8.4 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi restrictedpython(PyPI) | < 8.4 | 8.4 |
| pypi restrictedpython(PyPI) | = 3.4.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.4.3 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.5.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.5.1 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.5.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.6.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 3.6.0a1 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0a1 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0a2 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0a3 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b1 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b2 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b3 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b4 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b5 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b6 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b7 | No fix listed |
| pypi restrictedpython(PyPI) | = 4.0b8 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.1 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.2a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.3 | No fix listed |
Show 39 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi restrictedpython(PyPI) | = 5.3a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 5.4 | No fix listed |
| pypi restrictedpython(PyPI) | = 6.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 6.0a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 6.1 | No fix listed |
| pypi restrictedpython(PyPI) | = 6.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.0a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.0a1.dev1 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.0a2.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.1 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.2a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.3 | No fix listed |
| pypi restrictedpython(PyPI) | = 7.4 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.0 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.1 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.1a1.dev0 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.2 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.3 | No fix listed |
| pypi restrictedpython(PyPI) | = 8.3a1.dev0 | No fix listed |
| zopefoundation RestrictedPython | = < 8.4 | No fix listed |
| debian/restrictedpython(Debian:12) | All versions | No fix listed |
| debian/restrictedpython(Debian:12) | = 4.0~b3-3 | No fix listed |
| debian/restrictedpython(Debian:12) | = 6.2-1 | No fix listed |
| debian/restrictedpython(Debian:12) | = 8.0-1 | No fix listed |
| debian/restrictedpython(Debian:12) | = 8.1-1 | No fix listed |
| debian/restrictedpython(Debian:12) | = 8.4-1 | No fix listed |
| debian/restrictedpython(Debian:13) | All versions | No fix listed |
| debian/restrictedpython(Debian:13) | = 8.0-1 | No fix listed |
| debian/restrictedpython(Debian:13) | = 8.1-1 | No fix listed |
| debian/restrictedpython(Debian:13) | = 8.4-1 | No fix listed |
| debian/restrictedpython(Debian:14) | < 8.4-1 | 8.4-1 |
| debian/restrictedpython(Debian:14) | = 8.0-1 | No fix listed |
| debian/restrictedpython(Debian:14) | = 8.1-1 | No fix listed |
| ubuntu/restrictedpython(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/restrictedpython(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/restrictedpython(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/restrictedpython(Ubuntu:26.10) | All versions | No fix listed |
References
- https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-hp3v-5vw7-fx9w vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/zopefoundation/RestrictedPython/commit/3b47440070b91f8807c2b2998aca99e94783639a patch
- github.com product
- https://github.com/zopefoundation/RestrictedPython/releases/tag/8.4
- pypi.org product
- github.com vendor-advisory
- Debian Security Tracker CVE-2026-76825 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2026-80780 third-party-advisory