Skip to content
Fencer Vulns
high 8.4

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

  • pypi restrictedpython 8.4
  • restrictedpython Debian 14 8.4-1

debian advisories DEBIAN-CVE-2026-76825

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

Weakness
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-470 Use of Externally-Controlled Input to Select Classes or Code
  • CWE-680 Integer Overflow to Buffer Overflow
  • CWE-693 Protection Mechanism Failure

References

Sources

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.