{"id":"CVE-2026-76825","published":"2026-09-16T15:17:46.000","lastModified":"2026-09-16T19:17:34.720","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.","cvssScore":8.4,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H","cwes":["CWE-200","CWE-470","CWE-680","CWE-693"],"vendors":[],"products":[],"references":[{"url":"https://github.com/zopefoundation/RestrictedPython/commit/3b47440070b91f8807c2b2998aca99e94783639a","tags":[]},{"url":"https://github.com/zopefoundation/RestrictedPython/releases/tag/8.4","tags":[]},{"url":"https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-hp3v-5vw7-fx9w","tags":[]}],"exploitRefs":[{"url":"https://github.com/zopefoundation/RestrictedPython/commit/3b47440070b91f8807c2b2998aca99e94783639a","tags":[]},{"url":"https://github.com/zopefoundation/RestrictedPython/releases/tag/8.4","tags":[]},{"url":"https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-hp3v-5vw7-fx9w","tags":[]}],"hasPoc":true,"ai":{"summary":"The flaw allows restricted code to escape the sandbox by accessing standard library functions and classes, leading to potential RCE, data leakage, and integrity issues.","exploitability":"Exploitation requires custom import policy or globals exposing the string module or Formatter class, making it moderately difficult.","blast_radius":"If exploited, it could impact confidentiality, integrity, and availability in the host environment, affecting the entire system.","remediation":"Upgrade to version 8.4 or later.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["rce","web","python","sandbox","string","formatter"],"model":"qwen2.5:7b-instruct","analyzedAt":"2026-10-02T08:50:10.789Z"}}