7.5high
td has pre-auth denial of service via unbounded memory allocation in proto.UnencryptedMessage.Decode
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.35% (higher than 30% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-whmm-qj9r-wvr2GO-2026-6138
Description
gotd/td is a T Telegram MTProto API client in Go. Prior to 0.145.1, proto.UnencryptedMessage.Decode in proto/unencrypted_message.go read attacker controlled dataLen from an unauthenticated MTProto unencrypted packet and allocated make([]byte, dataLen) before checking the remaining buffer, allowing remote unauthenticated denial of service through excessive memory allocation and CPU or garbage collection pressure. This issue is fixed in version 0.145.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gotd td | < 0.145.1 | CVE List |
| github.com/gotd/td (Go) | before 0.145.1 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
gotd/td is a T Telegram MTProto API client in Go. Prior to 0.145.1, proto.UnencryptedMessage.Decode in proto/unencrypted_message.go read attacker controlled dataLen from an unauthenticated MTProto unencrypted packet and allocated make([]byte, dataLen) before checking the remaining buffer, allowing remote unauthenticated denial of service through excessive memory allocation and CPU or garbage collection pressure. This issue is fixed in version 0.145.1.
GitHub Advisory Database
Impact
A remote, unauthenticated attacker can cause excessive memory allocation (and resulting CPU / GC pressure, potentially OOM termination) by sending a crafted unencrypted MTProto packet.
(*proto.UnencryptedMessage).Decode read an attacker-controlled 32-bit dataLen field and immediately allocated a buffer of that size via make([]byte, dataLen) before validating that the underlying buffer actually contained that many bytes. A 20-byte packet declaring a ~1.75 GB payload (e.g. dataLen = 0x70000000) forces the runtime to provision and zero-initialize a multi-gigabyte heap allocation before the length is rejected.
Unencrypted messages are part of the unauthenticated MTProto handshake path, so no credentials or established session are required to reach the vulnerable code.
Impact is limited to availability; there is no evidence of memory corruption, out-of-bounds access, or code execution.
Patches
Fixed in v0.145.1 by validating dataLen against the remaining buffer length before allocation (commit 9d5d1f31e).
Workarounds
Upgrade to v0.145.1 or later. There is no in-process workaround for affected versions short of avoiding exposure of the unauthenticated MTProto parsing path to untrusted peers.
Go Vulnerability Database
Unbounded memory allocation in proto.UnencryptedMessage.Decode in github.com/gotd/td
NVD (es)
gotd/td es un cliente API MTProto de Telegram T en Go. Antes de la versión 0.145.1, proto.UnencryptedMessage.Decode en proto/unencrypted_message.go leía un dataLen controlado por el atacante de un paquete MTProto no cifrado no autenticado y asignaba make([]byte, dataLen) antes de verificar el búfer restante, lo que permitía una denegación de servicio remota no autenticada a través de una asignación excesiva de memoria y presión de CPU o de recolección de basura. Este problema se solucionó en la versión 0.145.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54638 changed 2026-07-29 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-whmm-qj9r-wvr2 changed 2026-08-18 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6138 changed 2026-08-18 | CC-BY-4.0 |
| NVD | CVE-2026-54638 changed 2026-10-23 | Public domain |