stellar-xdr: `StringM::from_str` bypasses max length validation
Description
stellar-xdr is a library and CLI containing types and functionality for working with Stellar XDR. Prior to version 25.0.1, StringM::from_str does not validate that the input length is within the declared maximum (MAX). Calling StringM::::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. This issue has been patched in version 25.0.1.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
stellar-xdrcrates.io | < 25.0.1 | 25.0.1 |
Affected products
2- stellar/rs-stellar-xdrv5Range: < 25.0.1
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-x57h-xx53-v53wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-29795ghsaADVISORY
- github.com/stellar/rs-stellar-xdr/commit/1f840013c3e2fca0321fb844b048afa01d10dda6ghsax_refsource_MISCWEB
- github.com/stellar/rs-stellar-xdr/issues/499ghsax_refsource_MISCWEB
- github.com/stellar/rs-stellar-xdr/pull/500ghsax_refsource_MISCWEB
- github.com/stellar/rs-stellar-xdr/security/advisories/GHSA-x57h-xx53-v53wghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.