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

High 7.5 Published Updated

Remote unauthenticated attackers can cause denial of service in the gotd/td library by triggering excessive memory allocation via crafted MTProto packets.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-54638?

CVE-2026-54638 is a high-severity denial of service vulnerability in gotd td, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-789, CWE-770

Which versions are affected by CVE-2026-54638?

3 open source packages ship an affected version, including github.com/gotd/td.

PackageAffectedFixed in
github.com/gotd/td GoAll versions0.145.1
github.com/gotd/td GoAll versions0.145.1
github.com/gotd/td GoAll versions0.145.1

How do I fix CVE-2026-54638?

Upgrade github.com/gotd/td to 0.145.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-54638 being exploited?

There is no known exploitation of CVE-2026-54638 in the wild and no public exploit code.

Sources

Also known as GHSA-whmm-qj9r-wvr2, GO-2026-6138.

Is CVE-2026-54638 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free