CVE-2026-76825
RestrictedPython: Sandbox escape via string.Formatter field resolution
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Timeline
ID reserved
By GitHub_M
- 28 days later
· 28 days later
Published
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
| NVDNVD · Deferred | 3.1 | High8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.62% · top 50% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.4.
Weakness
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (opens in a new tab)All about CWE-200 and its CVEs
- CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (opens in a new tab)All about CWE-470 and its CVEs
- CWE-680: Integer Overflow to Buffer Overflow (opens in a new tab)All about CWE-680 and its CVEs
- CWE-693: Protection Mechanism Failure (opens in a new tab)All about CWE-693 and its CVEs
Affected products
zopefoundation · RestrictedPython
- affected < 8.4
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIRestrictedPythonGHSA-hp3v-5vw7-fx9w (opens in a new tab)
References (3)
- https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-hp3v-5vw7-fx9w (opens in a new tab)x_refsource_CONFIRM
- https://github.com/zopefoundation/RestrictedPython/commit/3b47440070b91f8807c2b2998aca99e94783639a (opens in a new tab)x_refsource_MISC
- https://github.com/zopefoundation/RestrictedPython/releases/tag/8.4 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-hp3v-5vw7-fx9w (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-76825)Record last updated .