CVE-2026-24889

Source
https://cve.org/CVERecord?id=CVE-2026-24889
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-24889.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-24889
Aliases
Published
2026-01-28T22:01:00.374Z
Modified
2026-01-29T19:34:14.328419Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
soroban-sdk has overflow in Bytes::slice, Vec::slice, GenRange::gen_range for u64
Details

soroban-sdk is a Rust SDK for Soroban contracts. Arithmetic overflow can be triggered in the Bytes::slice, Vec::slice, and Prng::gen_range (for u64) methods in the soroban-sdk in versions up to and including 25.0.1, 23.5.1, and 25.0.2. 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. The fix available in 25.0.1, 23.5.1, and 25.0.2 replaces bare arithmetic with checked_add / checked_sub, ensuring overflow traps regardless of the overflow-checks profile setting. As a workaround, contract workspaces can be configured with a profile available in the GitHub Securtity Advisory to enable overflow checks on the arithmetic operations. This is the best practice when developing Soroban contracts, and the default if using the contract boilerplate generated using stellar contract init. Alternatively, contracts can validate range bounds before passing them to slice or gen_range to ensure the conversions cannot overflow.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24889.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-190"
    ]
}
References

Affected packages

Git / github.com/stellar/rs-soroban-sdk

Affected ranges

Type
GIT
Repo
https://github.com/stellar/rs-soroban-sdk
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "22.0.9"
        }
    ]
}
Type
GIT
Repo
https://github.com/stellar/rs-soroban-sdk
Events
Database specific
{
    "versions": [
        {
            "introduced": "23.0.0"
        },
        {
            "fixed": "23.5.1"
        }
    ]
}
Type
GIT
Repo
https://github.com/stellar/rs-soroban-sdk
Events
Database specific
{
    "versions": [
        {
            "introduced": "25.0.0"
        },
        {
            "fixed": "25.0.2"
        }
    ]
}

Affected versions

v0.*
v0.0.3
v0.0.4
v0.0.6
v0.1.0
v0.1.1
v0.2.0
v0.2.1
v0.3.0
v0.3.1
v0.3.2
v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.5.0
v0.6.0
v0.7.0
v0.8.0
v0.8.1
v0.8.2
v0.8.3
v0.8.4
v0.9.0
v0.9.1
v0.9.2
v20.*
v20.0.0
v20.0.0-rc1
v20.0.0-rc2
v20.0.1
v20.0.2
v20.0.3
v20.1.0
v20.2.0
v20.3.0
v20.3.1
v20.3.2
v20.4.0
v20.5.0
v21.*
v21.0.1-preview.1
v21.0.1-preview.2
v21.0.1-preview.3
v21.1.0-rc.1
v21.1.1
v21.2.0
v21.3.0
v21.4.0
v21.5.0
v21.5.1
v21.5.2
v21.6.0
v21.7.0
v21.7.1
v22.*
v22.0.0
v22.0.0-rc.1
v22.0.0-rc.1.1
v22.0.0-rc.2
v22.0.0-rc.2.1
v22.0.0-rc.3
v22.0.0-rc.3.1
v22.0.0-rc.3.2
v22.0.1
v22.0.2
v22.0.3
v22.0.4
v22.0.5
v22.0.6
v22.0.7
v22.0.8
v23.*
v23.0.0
v23.0.1
v23.0.2
v23.0.3
v23.1.0
v23.1.1
v23.2.1
v23.3.0
v23.4.0
v23.4.1
v23.5.0
v25.*
v25.0.0
v25.0.1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-24889.json"