rs-soroban-sdk #[contractimpl] macro calls inherent function instead of trait function when names collide
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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 `<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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| stellar | rs-soroban-sdk | 25.0.0 to before 25.1.1; 23.0.0 to before 23.5.2; before 22.0.10 | 25.1.1, 23.5.2, 22.0.10 | Patch available | CNA |
| — | soroban-sdk-macros (crates.io) | 25.0.0 to before 25.1.1 | 25.1.1 | Patch available | GHSA-4chv-4c6w-w254 |
| — | soroban-sdk-macros (crates.io) | 23.0.0 to before 23.5.2 | 23.5.2 | Patch available | GHSA-4chv-4c6w-w254 |
| — | soroban-sdk-macros (crates.io) | before 22.0.10 | 22.0.10 | Patch available | GHSA-4chv-4c6w-w254 |
- rs-soroban-sdk Vendorstellar Affected 25.0.0 to before 25.1.1; 23.0.0 to before 23.5.2; before 22.0.10 Fixed in 25.1.1, 23.5.2, 22.0.10 Patch available CNA
- soroban-sdk-macros (crates.io) Vendor— Affected 25.0.0 to before 25.1.1 Fixed in 25.1.1 Patch available GHSA-4chv-4c6w-w254
- soroban-sdk-macros (crates.io) Vendor— Affected 23.0.0 to before 23.5.2 Fixed in 23.5.2 Patch available GHSA-4chv-4c6w-w254
- soroban-sdk-macros (crates.io) Vendor— Affected before 22.0.10 Fixed in 22.0.10 Patch available GHSA-4chv-4c6w-w254
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:* | before 22.0.10; 23.0.0 to before 23.5.2; 25.0.0 to before 25.1.1 | Vulnerable | stellar |
- cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:* Versions before 22.0.10; 23.0.0 to before 23.5.2; 25.0.0 to before 25.1.1 Vulnerable ·stellar
Remediation
- Fix · CNA rs-soroban-sdk (stellar) Fixed in 25.1.1, 23.5.2, 22.0.10
- Fix · GHSA-4chv-4c6w-w254 soroban-sdk-macros (crates.io) Fixed in 25.1.1 Advisory →
- Fix · GHSA-4chv-4c6w-w254 soroban-sdk-macros (crates.io) Fixed in 23.5.2 Advisory →
- Fix · GHSA-4chv-4c6w-w254 soroban-sdk-macros (crates.io) Fixed in 22.0.10 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-26267
- 2026-10-03 Alias added: GHSA-4chv-4c6w-w254
- 2026-10-18 Priority changed: LOW → MEDIUM
- 2026-10-25 Priority changed: MEDIUM → LOW
References
Patch 4
More stellar Rs-soroban-sdk vulnerabilities
- TI-2026-24850 soroban-sdk: `Fr` scalar field equality comparison bypasses modular reduction CVSS 3.1MEDIUM 5.3
- TI-2026-20074 soroban-sdk has overflow in Bytes::slice, Vec::slice, GenRange::gen_range for u64 CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-26267 · CVE Program
- CVE-2026-26267 · NVD
- FIRST EPSS
- GHSA-4chv-4c6w-w254 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences