GitHub Advisoryadvisory · crates.io
GHSA-fpf5-4jw8-67x8 rust-zserio has Unbounded Memory Allocation
HIGH
Official page ↗
- Ecosystem
- crates.io
- Packages
- rust-zserio
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-789
- Reviewed
- 2026-05-07
Affected packages
• crates.io rust-zserio: < 0.5.4 → fixed in 0.5.4
Description
Impact
When deserializing arrays, strings or bytes (blob) types zserio first reads the size of the variable, and then allocates sufficient memory to load data. Since the size is always trusted this can be abused by creating a data file with a large size value, causing the zserio runtime to allocate large amounts of memory.
Patches
Please cherry-pick 57f5fb.
Workarounds
• Do not accept `zserio`-encoded messages from non-trusted sources.
• Allocate a maximum heap amount to `rust-zerio` to avoid impacting other applications.
Related
Weakness · CWE (1)
- CWE-789 Memory Allocation with Excessive Size Value weakness
References
- https://github.com/Danaozhong/rust-zserio/security/advisories/GHSA-fpf5-4jw8-67x8 web
- https://github.com/ndsev/zserio/security/advisories/GHSA-cwq5-8pvq-j65j web
- https://github.com/Danaozhong/rust-zserio/commit/57f5fb4a2a8611d58dbcc1a9221349206dd99c3c web
- https://github.com/Danaozhong/rust-zserio package