<?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>Cpe:2.3:a:restrictedpython:restrictedpython:*:*:*:*:*:*:*:* - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3arestrictedpythonrestrictedpython/</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>Sat, 29 Aug 2026 03:13:27 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3arestrictedpythonrestrictedpython/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 Positional-Only Argument Guard Bypass</title><link>https://feed.craftedsignal.io/briefs/2026-08-restrictedpython-bypass/</link><pubDate>Sat, 29 Aug 2026 03:13:27 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-restrictedpython-bypass/</guid><description>RestrictedPython (&lt;= 8.2) fails to validate positional-only arguments, allowing an attacker to shadow security guard hooks (_getattr_, _getitem_, _write_, _print_) and bypass sandbox access policies.</description><content:encoded><![CDATA[<p>The RestrictedPython library utilizes specific guard hooks (such as <code>_getattr_</code>, <code>_getitem_</code>, <code>_write_</code>, and <code>_print_</code>) to rewrite and enforce security policies for sandboxed Python code. While the library correctly validates these protected names against standard function arguments, <code>*args</code>, <code>**kwargs</code>, and keyword-only arguments, it fails to perform the same checks for positional-only arguments defined before the <code>/</code> separator in a function signature.</p>
<p>This vulnerability allows an attacker to define a function with one of the restricted guard names as a positional-only argument. This effectively localizes the name, causing the Python interpreter to shadow the embedding application's intended security hook. When the sandboxed code executes, it invokes the attacker's defined function instead of the policy-enforcing hook. Depending on the broader application context, this bypass can be escalated into remote code execution, particularly if the application performs unsafe operations like unpickling objects controlled by the sandboxed environment.</p>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows for complete bypass of sandboxed environment restrictions. In scenarios where the host application relies on RestrictedPython to safely execute user-provided code, attackers can access forbidden system attributes, modify protected data, or exfiltrate information. In applications that perform insecure operations on sandbox-controlled objects, such as serialization or deserialization, this primitive can lead to remote code execution (RCE). The impact is highly dependent on how the embedding application utilizes the library.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritized actions for development and security operations teams:</p>
<ul>
<li>Upgrade RestrictedPython to the version containing the security patch as soon as it is released (addressing CVE-2026-55830).</li>
<li>If an immediate upgrade is not possible, implement a static analysis check in the ingestion pipeline to reject any Python source code that uses positional-only parameters containing leading underscores (e.g., <code>def f(_getattr_=..., /):</code>).</li>
<li>Review application code that utilizes RestrictedPython to ensure that objects returned from or manipulated by the sandbox are handled using secure, non-executable serialization methods (e.g., avoiding pickle).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category></item></channel></rss>