Lookup for vulnerable packages by Package URL.

Purlpkg:cargo/soroban-sdk-macros@25.0.0
Typecargo
Namespace
Namesoroban-sdk-macros
Version25.0.0
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version25.1.1
Latest_non_vulnerable_version25.1.1
Affected_by_vulnerabilities
0
url VCID-cv14-2day-5bfb
vulnerability_id VCID-cv14-2day-5bfb
summary
The rs-soroban-sdk #[contractimpl] macro calls inherent function instead of trait function when names collide
### Impact

The `#[contractimpl]` macro contains a bug in how it wires up function calls.

In Rust, you can define functions on a type in two ways:
- Directly on the type as an inherent function:
  ```rust
  impl MyContract {
      fn value() { ... }
  }
  ```
- Through a trait
  ```rust
  impl Trait for MyContract {
      fn value() { ... }
  }
  ```

These are two separate functions that happen to share the same name. Rust has rules for which one gets called. When you write `MyContract::value()`, Rust always picks the one defined directly on the type, not the trait version.

The bug is that `#[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:
1. A `impl Trait for MyContract` block is defined with one or more functions, with `#[contractimpl]` applied.
2. A `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.

For example:

```rust
#[contract]
pub struct Contract;

impl Contract {
    /// Inherent function — returns 1.
    /// Bug: The macro-generated WASM export is wired up to call this function.
    pub fn value() -> u32 {
        1
    }
}

pub trait Trait {
    fn value(env: Env) -> u32;
}

#[contractimpl]
impl Trait for MyContract {
    /// Trait implementation — returns 2.
    /// Fix: The macro-generated WASM export should call this function.
    fn value() -> u32 {
        2
    }
}
```

### Patches

The problem is patched in `soroban-sdk-macros` version **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` **>= 25.1.1** and recompile their contracts.

### Workarounds

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.
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-26267
reference_id
reference_type
scores
0
value 0.00052
scoring_system epss
scoring_elements 0.16712
published_at 2026-06-07T12:55:00Z
1
value 0.00052
scoring_system epss
scoring_elements 0.16648
published_at 2026-06-09T12:55:00Z
2
value 0.00052
scoring_system epss
scoring_elements 0.1663
published_at 2026-06-08T12:55:00Z
3
value 0.00052
scoring_system epss
scoring_elements 0.1675
published_at 2026-06-06T12:55:00Z
4
value 0.00052
scoring_system epss
scoring_elements 0.16754
published_at 2026-06-05T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-26267
1
reference_url https://github.com/stellar/rs-soroban-sdk
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/stellar/rs-soroban-sdk
2
reference_url https://github.com/stellar/rs-soroban-sdk/commit/e92a3933e5f92dc09da3c740cf6a360d55709a2b
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-02-19T20:58:43Z/
url https://github.com/stellar/rs-soroban-sdk/commit/e92a3933e5f92dc09da3c740cf6a360d55709a2b
3
reference_url https://github.com/stellar/rs-soroban-sdk/pull/1729
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-02-19T20:58:43Z/
url https://github.com/stellar/rs-soroban-sdk/pull/1729
4
reference_url https://github.com/stellar/rs-soroban-sdk/pull/1730
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-02-19T20:58:43Z/
url https://github.com/stellar/rs-soroban-sdk/pull/1730
5
reference_url https://github.com/stellar/rs-soroban-sdk/pull/1731
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-02-19T20:58:43Z/
url https://github.com/stellar/rs-soroban-sdk/pull/1731
6
reference_url https://github.com/stellar/rs-soroban-sdk/security/advisories/GHSA-4chv-4c6w-w254
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-02-19T20:58:43Z/
url https://github.com/stellar/rs-soroban-sdk/security/advisories/GHSA-4chv-4c6w-w254
7
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-26267
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-26267
8
reference_url https://github.com/advisories/GHSA-4chv-4c6w-w254
reference_id GHSA-4chv-4c6w-w254
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-4chv-4c6w-w254
fixed_packages
0
url pkg:cargo/soroban-sdk-macros@25.1.1
purl pkg:cargo/soroban-sdk-macros@25.1.1
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:cargo/soroban-sdk-macros@25.1.1
aliases CVE-2026-26267, GHSA-4chv-4c6w-w254
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-cv14-2day-5bfb
Fixing_vulnerabilities
Risk_score4.0
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:cargo/soroban-sdk-macros@25.0.0