<?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/"><channel><title>Pytonapi Project - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/pytonapi-project/</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>Tue, 28 Jul 2026 17:10:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/pytonapi-project/feed.xml" rel="self" type="application/rss+xml"/><item><title>pytonapi Webhook Custom Path Authentication Bypass (GHSA-3fcr-jvgp-7f58)</title><link>https://feed.craftedsignal.io/briefs/2026-07-pytonapi-webhook-auth-bypass/</link><pubDate>Tue, 28 Jul 2026 17:10:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-pytonapi-webhook-auth-bypass/</guid><description>The pytonapi library, specifically version 2.2.0, contains an authentication bypass vulnerability (GHSA-3fcr-jvgp-7f58) in its TonapiWebhookDispatcher, allowing unauthenticated remote attackers to send forged payloads to custom webhook endpoints, triggering victim-defined business logic and causing integrity impact.</description><content:encoded><![CDATA[<p>The <code>pytonapi</code> library, specifically version 2.2.0, is affected by an authentication bypass vulnerability, identified as GHSA-3fcr-jvgp-7f58. The <code>TonapiWebhookDispatcher</code> component fails to properly validate the <code>Authorization</code> header when a webhook handler is configured using the documented <code>path=</code> argument, creating a custom endpoint. During setup, bearer tokens are only associated with default suffix paths, leaving custom paths without a corresponding token entry. Consequently, when an incoming request targets a custom path, the system's authentication check is silently bypassed as <code>expected_token</code> evaluates to <code>None</code>. This &quot;fail-open&quot; mechanism allows an unauthenticated remote attacker to send forged JSON payloads to these custom webhook endpoints. This can trigger victim-defined business logic, such as payment processing or account state updates, with attacker-controlled data, leading to severe integrity impact and potential financial or operational harm. Any application integrating this specific version of <code>pytonapi</code> and utilizing custom webhook paths is vulnerable.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Attacker Reconnaissance</strong>: An attacker identifies a target application utilizing <code>pytonapi</code> with <code>TonapiWebhookDispatcher</code> configured to use a custom webhook path (e.g., <code>/hook/custom</code>).</li>
<li><strong>Payload Crafting</strong>: The attacker constructs a malicious JSON payload designed to mimic a legitimate <code>pytonapi</code> webhook event (e.g., an <code>account_tx</code> notification) but containing forged data (e.g., a <code>FORGED_TX_HASH</code>).</li>
<li><strong>Exploitation Attempt</strong>: The attacker sends an unauthenticated HTTP POST request to the application's custom webhook endpoint (e.g., <code>https://victim.example/hook/custom</code>), embedding the forged JSON payload in the request body. The <code>Authorization</code> header is either omitted or contains an incorrect bearer token.</li>
<li><strong>Vulnerability Trigger</strong>: The <code>pytonapi</code> <code>TonapiWebhookDispatcher</code> instance receives the incoming HTTP request. When processing the request for the custom path, the dispatcher attempts to retrieve an <code>expected_token</code> from its internal map using <code>self._tokens.get(path)</code>.</li>
<li><strong>Authentication Bypass</strong>: Because custom paths are never registered in <code>_tokens</code>, the <code>expected_token</code> variable becomes <code>None</code>. This causes the subsequent authentication check <code>if expected_token is not None</code> to evaluate to <code>False</code>, silently bypassing the entire authentication mechanism.</li>
<li><strong>Payload Processing</strong>: The dispatcher proceeds to parse the attacker's forged JSON payload as if it were a legitimate and authenticated webhook event.</li>
<li><strong>Impact Delivery</strong>: The victim-defined asynchronous event handler (e.g., <code>on_custom_tx</code>) associated with the custom path is invoked by the dispatcher, receiving and processing the attacker-controlled forged data.</li>
<li><strong>Adverse Action</strong>: The victim's application executes its business logic (e.g., updating account balances, initiating payments, dispatching notifications) based on the attacker's forged information, leading to financial loss, data corruption, or other integrity compromises.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability, classified as Improper Authentication (CWE-287), critically impacts the integrity of applications using <code>pytonapi</code> version 2.2.0 that have registered webhook handlers with the <code>path=</code> argument. There is no specific number of victims or sectors identified, but any application meeting these criteria is fully exposed. A successful exploitation allows an unauthenticated remote attacker to inject arbitrary, forged TON blockchain event data, directly triggering and manipulating victim-defined business logic. This can lead to severe consequences such as fraudulent payment processing, incorrect account state updates, or the dispatch of misleading notifications, resulting in financial losses or operational disruption. Confidentiality is not directly affected, but data integrity and the reliability of automated processes are significantly compromised.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Update <code>pytonapi</code> to a patched version greater than 2.2.0 to resolve the GHSA-3fcr-jvgp-7f58 authentication bypass.</li>
<li>Deploy the Sigma rule &quot;Detect Successful POST to pytonapi Custom Webhook Path (GHSA-3fcr-jvgp-7f58)&quot; to your SIEM solution to identify potential exploitation attempts against vulnerable <code>pytonapi</code> applications.</li>
<li>Review webserver access logs for <code>webserver</code> entries indicating successful (HTTP 200 OK) POST requests to custom webhook paths (e.g., <code>/hook/custom</code>) that lack expected authentication headers or originate from unexpected sources.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>authentication-bypass</category><category>webhooks</category><category>python</category></item></channel></rss>