High, CVSS 7.5GoAmendedPublished
td has pre-auth denial of service via unbounded memory allocation in proto.UnencryptedMessage.Decode
CVE-2026-54638 · GHSA-whmm-qj9r-wvr2
- Affected
- Go github.com/gotd/td < 0.145.1
- Fixed in
- 0.145.1· Vendor fix available
- Issue
- 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…
Recommended action: Upgrade to 0.145.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.