CVE-2026-76825 json
RestrictedPython: Sandbox escape via string.Formatter field resolution
published 2026-09-16 54 d ago modified 2026-10-01 38 d ago also GHSA-hp3v-5vw7-fx9w , PYSEC-2026-4161 , EUVD-2026-80780
- cvss
- 8.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 50%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 53 d ago
Exploit prediction
0.62% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
| OSV | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | restrictedpython | <8.4 |
8.4 |
Affected products
- zopefoundation RestrictedPython
Classification
References
-
github.com
/zopefoundation/RestrictedPython/commit/3b47440070b91f8807c2b2998aca99e94783639a
web
-
github.com
/zopefoundation/RestrictedPython/security/advisories/GHSA-hp3v-5vw7-fx9w
web
-
github.com
/zopefoundation/RestrictedPython/releases/tag/8.4
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-76825
advisory
-
github.com
/zopefoundation/RestrictedPython
package
-
pypi.org
/project/restrictedpython
package
-
github.com
/advisories/GHSA-hp3v-5vw7-fx9w
advisory
Sources
- CVE List CVE-2026-76825
- GitHub Advisory GHSA-hp3v-5vw7-fx9w
- NVD CVE-2026-76825
- OSV PYSEC-2026-4161
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.