Skip to content

← Actionable
High, CVSS 7.5

The rs-soroban-sdk #[contractimpl] macro calls inherent function instead of trait function when names collide

CVE-2026-26267GHSA-4chv-4c6w-w254

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (soroban-sdk-macros 25.1.1, 23.5.2, 22.0.10), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io soroban-sdk-macros

    Affected
    >= 25.0.0, <= 25.1.0>= 23.0.0, <= 23.5.1<= 22.0.9
    Fixed in
    25.1.1, 22.0.10, 23.5.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
  • CVE-2026-26267: 0.36% estimated exploitation activity in the next 30 days; percentile 29.92 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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: - Through a trait 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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-4chv-4c6w-w254

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-26267

Advisory: The rs-soroban-sdk #[contractimpl] macro calls inherent function instead of trait function when names collide
IDs: CVE-2026-26267, GHSA-4chv-4c6w-w254
Record: https://patchnext.com/advisories/cve-2026-26267 (revision 1, source checked 26 Oct 2026, 15:39 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: soroban-sdk-macros 25.1.1, 23.5.2, 22.0.10. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io soroban-sdk-macros: affected >= 25.0.0, <= 25.1.0; >= 23.0.0, <= 23.5.1; <= 22.0.9; fixed in 25.1.1, 22.0.10, 23.5.2

## Suggested inspection (read-only)
- crates.io soroban-sdk-macros: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on soroban-sdk-macros.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-4chv-4c6w-w254 (GitHub-reviewed advisory GHSA-4chv-4c6w-w254 lists affected ranges: crates.io soroban-sdk-macros >=25.0.0 =23.0.0 =0 <=22.0.9)

Commands are suggestions: review each one before running it.

Loading voting…