Information Disclosure in RestrictedPython (CVE-2026-76825)
Summary
Vulnerability in RestrictedPython (CVE-2026-76825). Successful exploitation can lead to full system takeover. Exploitable via string. Mitigation: upgrade to 8.4 or later.
Original description
The description as published by the source.
Impact
RestrictedPython could allow a sandbox escape when a policy exposes the standard library string module, or otherwise exposes string.Formatter, to restricted code.
string.Formatter field resolution methods such as get_field can perform attribute and item traversal internally and return live object references. This can bypass RestrictedPython's normal attribute guards and may allow access to sensitive objects such as function globals, builtins, file access, or code execution primitives.
Users are impacted if they run untrusted code with RestrictedPython and expose string.Formatter, directly or indirectly, for example through a custom import policy or globals.
Patches
The problem has been patched by blocking access to string.Formatter and unsafe string.Formatter traversal methods in safer_getattr.
Users should upgrade to the patched release once available. Affected and patched version numbers should be filled in when the release is published.
Workarounds
Do not expose the standard library string module or string.Formatter to restricted code.
If a custom import hook is used, deny imports of string or provide only a restricted wrapper that does not expose Formatter. If custom globals are supplied, ensure neither string.Formatter nor Formatter instances are available to restricted code.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-76825 has been found in RestrictedPython.
Attackers can target a specific entry point like string over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.4/10.
What to do: upgrade RestrictedPython to 8.4 or later.
If unsure, ask your IT team or search "RestrictedPython CVE-2026-76825" on the vendor's site.
CVE-2026-76825 (RestrictedPython) — CWE-200 / CVSS v3 8.4
Attack vector: remote (network-reachable)
Attack surface: string / string.Formatter / get_field / safer_getattr
Patched: 8.4 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Information disclosure (CWE-200) exists in RestrictedPython. Attackers reach the vulnerable code path via string.
Check the vendor advisory for the affected versions of RestrictedPython. Attack surface: string / string.Formatter / get_field / safer_getattr.
Severity: High (CVSS 8.4/10). Successful exploitation can lead to full system takeover.
Update to 8.4.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'RestrictedPython' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'RestrictedPython' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
RestrictedPythonを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade RestrictedPython to 8.4ステージング環境で 8.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web github.com
- web github.com