CVE-2026-29795: stellar-xdr's StringM::from_str bypasses max length validation
(updated )
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
- nvd.nist.gov/vuln/detail/CVE-2026-29795
Code Behaviors & Features
Detect and mitigate CVE-2026-29795 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 →