GHSA-fpf5-4jw8-67x8: Rust zserio Rust-zserio Has Unbounded Memory Allocation Vulnerability

HIGH
CVSS 7.5
CWE-789
Published
Advisory Summary

GHSA-fpf5-4jw8-67x8 is a HIGH (CVSS 7.5) rust-zserio has unbounded memory allocation vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Rust zserio libraries in the crates.io ecosystem. The issue involves rust-zserio has unbounded memory allocation. Remediation is available by upgrading affected packages to version 0.5.4.

GHSA-fpf5-4jw8-67x8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fpf5-4jw8-67x8
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Rust zserio
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-fpf5-4jw8-67x8

To remediate this vulnerability, upgrade all affected Rust zserio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rust-zserio fixed: 0.5.4
Upgrade rust-zserio to 0.5.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rust-zserio

How to Check if You Are Affected

To determine whether your application is affected by GHSA-fpf5-4jw8-67x8, inspect your project dependencies for Rust zserio:

inspect dependencies for rust-zserio

Analyze the terminal output to locate any version of Rust zserio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Rust zserio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

GHSA-fpf5-4jw8-67x8 Affected Rust zserio Versions

1 component(s)
Fixed Versions:
0.5.4
Product / Package Ecosystem Affected Versions Fixed Version
rust-zserio
crates.io
< 0.5.4
0.5.4

References

Frequently Asked Questions

What is GHSA-fpf5-4jw8-67x8?
GHSA-fpf5-4jw8-67x8 is a security vulnerability in Rust zserio involving rust-zserio has Unbounded Memory Allocation under CWE-789: Memory Allocation with Excessive Size Value.
Which Rust zserio versions are affected?
Affected versions include releases prior to 0.5.4 across affected packages: rust-zserio.
What version fixes GHSA-fpf5-4jw8-67x8?
Upgrading to 0.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rust-zserio affected?
Yes, rust-zserio is affected in releases prior to 0.5.4. Upgrade your dependency to 0.5.4 or later.
What is the CVSS score of GHSA-fpf5-4jw8-67x8?
GHSA-fpf5-4jw8-67x8 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-fpf5-4jw8-67x8?
GHSA-fpf5-4jw8-67x8 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check crates.io dependencies for GHSA-fpf5-4jw8-67x8?
Run the dependency tree command: 'inspect dependencies for rust-zserio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fpf5-4jw8-67x8",
  "modified" : "2026-05-07T01:54:57Z",
  "published" : "2026-05-07T01:54:57Z",
  "aliases" : [ ],
  "summary" : "rust-zserio has Unbounded Memory Allocation",
  "details" : "### Impact\n\nWhen 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.\n\n### Patches\n\nPlease cherry-pick [57f5fb](https://github.com/Danaozhong/rust-zserio/commit/57f5fb4a2a8611d58dbcc1a9221349206dd99c3c).\n\n### Workarounds\n\n- Do not accept `zserio`-encoded messages from non-trusted sources.\n- Allocate a maximum heap amount to `rust-zerio` to avoid impacting other applications.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "rust-zserio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.5.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Danaozhong/rust-zserio/security/advisories/GHSA-fpf5-4jw8-67x8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ndsev/zserio/security/advisories/GHSA-cwq5-8pvq-j65j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Danaozhong/rust-zserio/commit/57f5fb4a2a8611d58dbcc1a9221349206dd99c3c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Danaozhong/rust-zserio"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T01:54:57Z",
    "nvd_published_at" : null
  }
}