CVE-2026-24889: soroban-sdk has overflow in Bytes::slice, Vec::slice, GenRange::gen_range for u64
(updated )
Arithmetic overflow can be triggered in the Bytes::slice, Vec::slice, and Prng::gen_range (for u64) methods in the soroban-sdk in versions prior to and including 25.0.1.
Contracts that pass user-controlled or computed range bounds to Bytes::slice, Vec::slice, or Prng::gen_range may silently operate on incorrect data ranges or generate random numbers from an unintended range, potentially resulting in corrupted contract state.
Note that the best practice when using the soroban-sdk and building Soroban contracts is to always enable overflow-checks = true. The stellar contract init tool that prepares the boiler plate for a Soroban contract, as well as all examples and docs, encourage the use of configuring overflow-checks = true on release profiles so that these arithmetic operations fail rather than silently wrap. Contracts are only impacted if they use overflow-checks = false either explicitly or implicitly. It is anticipated the majority of contracts could not be impacted because the best practice encouraged by tooling is to enable overflow-checks.
References
- github.com/advisories/GHSA-96xm-fv9w-pf3f
- github.com/stellar/rs-soroban-sdk
- github.com/stellar/rs-soroban-sdk/commit/3890521426d71bb4d892b21f5a283a1e836cfa38
- github.com/stellar/rs-soroban-sdk/commit/59fcef437260ed4da42d1efb357137a5c166c02e
- github.com/stellar/rs-soroban-sdk/commit/c2757c6d774dbb28b34a0b77ffe282e59f0f8462
- github.com/stellar/rs-soroban-sdk/pull/1703
- github.com/stellar/rs-soroban-sdk/releases/tag/v22.0.9
- github.com/stellar/rs-soroban-sdk/releases/tag/v23.5.1
- github.com/stellar/rs-soroban-sdk/releases/tag/v25.0.2
- github.com/stellar/rs-soroban-sdk/security/advisories/GHSA-96xm-fv9w-pf3f
- nvd.nist.gov/vuln/detail/CVE-2026-24889
Code Behaviors & Features
Detect and mitigate CVE-2026-24889 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 →