Intel

AIKIDO-2026-850672

tls_codec is vulnerable to Denial of Service (DoS)

Denial of Service (DoS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

65

Medium Risk

This Affects:

RUSTtls_codec
0.2.0 - 0.4.2
Fixed in 0.5.0
Are you affected? Scan for Free

TL;DR

The crate decodes TLS-encoded element vectors and byte vectors from input using length-prefixed deserialization. Element-vector decoding does not reject zero-length elements that never advance the read cursor, so a crafted element can drive an infinite loop and unbounded memory growth, while byte-vector decoding eagerly allocates a buffer sized directly from the untrusted length prefix. A malicious peer can supply a small message that hangs the decoder or exhausts available memory. The fix rejects zero-length elements, enforces the declared vector length by measuring actual byte consumption, caps eager allocations, and uses checked arithmetic to avoid length overflow.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and deserialize TLS-encoded vectors or byte vectors from untrusted or externally supplied input.

Background info

tls_codec is vulnerable to Denial of Service (DoS) in versions 0.2.0 - 0.4.2.

How to fix this

Upgrade the tls_codec library to the patch version.