High severity · published Sep 16, 2026
CVE-2026-76825
RestrictedPython: Sandbox escape via string.Formatter field resolution
8.4
CVSS
0.6%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
High
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 50% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RE
RestrictedPython · zopefoundation
< 8.4 · source: vendor
Affected product
RE
RestrictedPython
zopefoundation
More from RestrictedPython
9.9
CVE-2023-37271
RestrictedPython vulnerable to arbitrary code execution via stack frame sandbox escape
8.3
CVE-2026-55830
RestrictedPython guard hooks can be shadowed via positional-only arguments
7.9
CVE-2025-22153
try/except* clauses could allow bypass RestrictedPython via type confusion bug in the CPython interpreter
7.7
CVE-2023-41039
Sandbox escape via various forms of "format" in RestrictedPython
6.5
CVE-2024-47532
RestrictedPython information leakage via `AttributeError.obj` and the `string` module