<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>RestrictedPython (&lt; 8.4) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/restrictedpython--8.4/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 17 Sep 2026 19:14:05 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/restrictedpython--8.4/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>RestrictedPython Sandbox Escape via string.Formatter</title><link>https://feed.craftedsignal.io/briefs/2026-09-restrictedpython-sandbox-escape/</link><pubDate>Thu, 17 Sep 2026 19:14:05 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-restrictedpython-sandbox-escape/</guid><description>RestrictedPython versions prior to 8.4 are vulnerable to a sandbox escape (CVE-2026-76825) via the string.Formatter module, which can bypass attribute guards to access sensitive objects and primitives.</description><content:encoded><![CDATA[<p>RestrictedPython, a package designed to provide a sandbox environment for executing untrusted Python code, contains a vulnerability identified as CVE-2026-76825. This vulnerability allows for a sandbox escape if an application policy exposes the standard library 'string' module or the 'string.Formatter' class to the restricted environment.</p>
<p>The issue stems from how 'string.Formatter' performs field resolution. Specifically, internal methods such as 'get_field' can perform attribute and item traversal that bypasses RestrictedPython's established attribute guards. By leveraging this behavior, an attacker capable of executing code within the restricted environment can obtain references to sensitive objects. These objects may include function globals, builtins, and code execution primitives, potentially enabling the attacker to break out of the sandbox to perform arbitrary operations on the underlying host system. This vulnerability affects all versions of RestrictedPython prior to 8.4.</p>
<h2 id="impact">Impact</h2>
<p>The vulnerability poses a severe risk to any application relying on RestrictedPython to safely execute untrusted user-supplied code. If successfully exploited, an attacker could escalate privileges from the restricted sandbox to the host environment, leading to full application compromise, unauthorized data access, or arbitrary code execution. The scope of impact is dependent on the application's configuration and the level of access granted to the 'string' module within its restricted environment.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritized actions for development and security teams:</p>
<ul>
<li>Upgrade the 'RestrictedPython' package to version 8.4 or later immediately to apply the fix in 'safer_getattr'.</li>
<li>Review custom import policies to ensure the 'string' module and 'string.Formatter' class are not exposed to restricted execution environments.</li>
<li>Audit custom global configurations passed to RestrictedPython to ensure neither 'string.Formatter' nor instances of it are accessible to untrusted code.</li>
<li>Implement a policy of least privilege by restricting access to standard library modules within the Python sandbox environment.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>sandbox-escape</category><category>cve-2026-76825</category><category>python</category></item></channel></rss>