Description
pytonapi is a Python SDK for TONAPI that provides REST API, streaming, and webhook access to the TON blockchain. From 2.0.0 to 2.2.0, TonapiWebhookDispatcher fails to validate the Authorization header when a webhook handler is registered with the documented path argument, because setup() stores bearer tokens only under the default suffix paths and never adds the custom path to the token map, so self._tokens.get(path) returns None and the authentication guard is skipped. An unauthenticated remote attacker can POST forged payloads to the custom webhook endpoint and trigger victim-defined handlers. This issue is fixed in version 2.2.1.
References5
- github.com/nessshon/tonapi/commit/854222b7ee68d3fb7b4d6d899d200…
- github.com/nessshon/tonapi/releases/tag/v2.2.1
- github.com/nessshon/tonapi/security/advisories/GHSA-3fcr-jvgp-7…
- github.com/pypa/advisory-database/tree/main/vulns/pytonapi/PYSE…
- github.com/nessshon/tonapi/security/advisories/GHSA-3fcr-jvgp-7…
Metrics
- CVSS 3.1
-
7.5
HIGH
Score source: CNA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - EPSS — exploit probability
- 1% percentile: 44 · as of 13 November 2026
- CWE
- CWE-287
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.