Intel

AIKIDO-2026-11081

serde_with is vulnerable to Denial of Service

Denial of ServiceGHSA-7gcf-g7xr-8hxj Published Today

51

Medium Risk

This Affects:

RUSTserde_with
0.0.1 - 3.20.0
Fixed in 3.21.0
Are you affected? Scan for Free

TL;DR

The KeyValueMap serializer in serde_with preallocates collection capacities from caller-supplied lengths and size hints without bounds checks. When serializing attacker-influenced data that contains empty inner sequences, empty map entries, or oversized size hints, the allocator panics during capacity calculation. A peer who can shape values fed to a serde_as(as = "KeyValueMap<_>") serializer can therefore crash the host process and deny service. The fix routes all collection creations through a cautious size-hint helper that caps reservation requests to a safe maximum.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

serde_with is vulnerable to Denial of Service in versions 0.0.1 - 3.20.0.

How to fix this

Upgrade the serde_with library to the patch version.