# CVE-2026-54635: pytonapi has a Webhook Custom Path Authentication Bypass

> An unauthenticated attacker can bypass webhook authentication in the pytonapi library by using a custom path, allowing them to trigger victim-defined handlers with forged payloads.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Jul 2026
- **Updated:** 11 Aug 2026
- **Also known as:** GHSA-3fcr-jvgp-7f58, PYSEC-2026-3614

## What is CVE-2026-54635?

CVE-2026-54635 is a high-severity authentication bypass vulnerability in nessshon tonapi, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2026-54635?

3 open source packages ship an affected version, including pytonapi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pytonapi` | PyPI | From 2.0.0 | 2.2.1 |
| `pytonapi` | PyPI | From 2.0.0 | 2.2.1 |
| `pytonapi` | PyPI | From 2.0.0 | 2.2.1 |

## How do I fix CVE-2026-54635?

Upgrade pytonapi to 2.2.1 or later.

## Is CVE-2026-54635 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54635 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54635 and fix it if it is affected.

What it is: CVE-2026-54635 is a high-severity authentication bypass vulnerability in nessshon tonapi, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54635 exists.

Affected packages and fixed versions:
- pytonapi (PyPI): affected from 2.0.0; fixed in 2.2.1
- pytonapi (PyPI): affected from 2.0.0; fixed in 2.2.1
- pytonapi (PyPI): affected from 2.0.0; fixed in 2.2.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54635/ (Markdown: https://insights.sbomify.com/CVE-2026-54635/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54635
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54635
- OSV: https://osv.dev/vulnerability/CVE-2026-54635

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54635/
Summaries are generated and may contain mistakes; the official description above is the record.
