CVE-2026-26267

Source
https://cve.org/CVERecord?id=CVE-2026-26267
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-26267.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-26267
Aliases
Published
2026-02-19T19:35:40.539Z
Modified
2026-03-03T02:56:10.761865Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
rs-soroban-sdk #[contractimpl] macro calls inherent function instead of trait function when names collide
Details

soroban-sdk is a Rust SDK for Soroban contracts. Prior to versions 22.0.10, 23.5.2, and 25.1.1, the #[contractimpl] macro contains a bug in how it wires up function calls. #[contractimpl] generates code that uses MyContract::value() style calls even when it's processing the trait version. This means if an inherent function is also defined with the same name, the inherent function gets called instead of the trait function. This means the Wasm-exported entry point silently calls the wrong function when two conditions are met simultaneously: First, an impl Trait for MyContract block is defined with one or more functions, with #[contractimpl] applied. Second, an impl MyContract block is defined with one or more identically named functions, without #[contractimpl] applied. If the trait version contains important security checks, such as verifying the caller is authorized, that the inherent version does not, those checks are bypassed. Anyone interacting with the contract through its public interface will call the wrong function. The problem is patched in soroban-sdk-macros versions 22.0.10, 23.5.2, and 25.1.1. The fix changes the generated call from <Type>::func() to &lt;Type as Trait>::func() when processing trait implementations, ensuring Rust resolves to the trait associated function regardless of whether an inherent function with the same name exists. Users should upgrade to soroban-sdk-macros 22.0.10, 23.5.2, or 25.1.1 and recompile their contracts. If upgrading is not immediately possible, contract developers can avoid the issue by ensuring that no inherent associated function on the contract type shares a name with any function in the trait implementation. Renaming or removing the conflicting inherent function eliminates the ambiguity and causes the macro-generated code to correctly resolve to the trait function.

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

Affected packages

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

Affected ranges

Type
GIT
Repo
https://github.com/stellar/rs-soroban-sdk
Events
Database specific
{
    "versions": [
        {
            "introduced": "25.0.0"
        },
        {
            "fixed": "25.1.1"
        }
    ]
}
Type
GIT
Repo
https://github.com/stellar/rs-soroban-sdk
Events
Database specific
{
    "versions": [
        {
            "introduced": "23.0.0"
        },
        {
            "fixed": "23.5.2"
        }
    ]
}
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.10"
        }
    ]
}

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
v22.0.9
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
v23.5.1
v25.*
v25.0.0
v25.0.1
v25.0.2
v25.1.0

Database specific

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