Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. stellar-xdr
  4. ›
  5. GHSA-x57h-xx53-v53w

GHSA-x57h-xx53-v53w: stellar-xdr's StringM::from_str bypasses max length validation

March 5, 2026

StringM::from_str does not validate that the input length is within the declared maximum (MAX). Calling StringM::<N>::from_str(s) where s is longer than N bytes succeeds and returns an Ok value instead of Err(Error::LengthExceedsMax), producing a StringM that violates its length invariant.

This affects any code that constructs StringM values from string input using FromStr (including str::parse), and relies on the type’s maximum length constraint being enforced. An oversized StringM could propagate through serialization, validation, or other logic that assumes the invariant holds.

All published versions of the stellar-xdr crate up to and including v25.0.0 are affected.

References

  • github.com/advisories/GHSA-x57h-xx53-v53w
  • github.com/stellar/rs-stellar-xdr
  • github.com/stellar/rs-stellar-xdr/commit/1f840013c3e2fca0321fb844b048afa01d10dda6
  • github.com/stellar/rs-stellar-xdr/issues/499
  • github.com/stellar/rs-stellar-xdr/pull/500
  • github.com/stellar/rs-stellar-xdr/security/advisories/GHSA-x57h-xx53-v53w

Code Behaviors & Features

Detect and mitigate GHSA-x57h-xx53-v53w with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 25.0.1

Fixed versions

  • 25.0.1

Solution

Upgrade to version 25.0.1 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

cargo/stellar-xdr/GHSA-x57h-xx53-v53w.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 10 Apr 2026 12:17:22 +0000.