Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/gotd/td
  4. ›
  5. CVE-2026-54638

CVE-2026-54638: td has pre-auth denial of service via unbounded memory allocation in proto.UnencryptedMessage.Decode

July 28, 2026

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.

References

  • github.com/advisories/GHSA-whmm-qj9r-wvr2
  • github.com/gotd/td/commit/9d5d1f31ea5022d9798d84ccce15de2e91ba6baa
  • github.com/gotd/td/issues/1711
  • github.com/gotd/td/releases/tag/v0.145.1
  • github.com/gotd/td/security/advisories/GHSA-whmm-qj9r-wvr2
  • nvd.nist.gov/vuln/detail/CVE-2026-54638

Code Behaviors & Features

Detect and mitigate CVE-2026-54638 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.145.1

Fixed versions

  • 0.145.1

Solution

Upgrade to version 0.145.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling
  • CWE-789: Memory Allocation with Excessive Size Value

Source file

go/github.com/gotd/td/CVE-2026-54638.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 29 Jul 2026 12:21:06 +0000.