# GHSA-fpf5-4jw8-67x8: rust-zserio has Unbounded Memory Allocation

> An attacker can cause denial of service by providing crafted data with large size values, forcing excessive memory allocation in the rust-zserio library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 May 2026

## What is GHSA-fpf5-4jw8-67x8?

GHSA-fpf5-4jw8-67x8 is a denial of service vulnerability in rust-zserio, published on 7 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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](https://github.com/Danaozhong/rust-zserio/commit/57f5fb4a2a8611d58dbcc1a9221349206dd99c3c).

### Workarounds

- Do not accept `zserio`-encoded messages from non-trusted sources.
- Allocate a maximum heap amount to `rust-zerio` to avoid impacting other applications.

## Which versions are affected by GHSA-fpf5-4jw8-67x8?

2 open source packages ship an affected version, including rust-zserio.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rust-zserio` | crates.io | All versions | 0.5.4 |
| `rust-zserio` | crates.io | All versions | 0.5.4 |

## How do I fix GHSA-fpf5-4jw8-67x8?

Upgrade rust-zserio to 0.5.4 or later.

## Is GHSA-fpf5-4jw8-67x8 being exploited?

There is no known exploitation of GHSA-fpf5-4jw8-67x8 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-fpf5-4jw8-67x8 and fix it if it is affected.

What it is: GHSA-fpf5-4jw8-67x8 is a denial of service vulnerability in rust-zserio, published on 7 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-fpf5-4jw8-67x8 in the wild and no public exploit code.

Affected packages and fixed versions:
- rust-zserio (crates.io): affected all versions; fixed in 0.5.4
- rust-zserio (crates.io): affected all versions; fixed in 0.5.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-fpf5-4jw8-67x8/ (Markdown: https://insights.sbomify.com/GHSA-fpf5-4jw8-67x8/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-fpf5-4jw8-67x8

---
From sbomify Insights: https://insights.sbomify.com/GHSA-fpf5-4jw8-67x8/
Summaries are generated and may contain mistakes; the official description above is the record.
