FKIE_CVE-2026-26267
Vulnerability from fkie_nvd - Published: 2026-02-19 20:25 - Updated: 2026-02-20 19:49
Severity ?
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.
References
Impacted products
| Vendor | Product | Version | |
|---|---|---|---|
| stellar | rs-soroban-sdk | * | |
| stellar | rs-soroban-sdk | * | |
| stellar | rs-soroban-sdk | * |
{
"configurations": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:*",
"matchCriteriaId": "05CB12AE-79C0-4E3E-A5DA-B7B4ADF1D6AF",
"versionEndExcluding": "22.0.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:*",
"matchCriteriaId": "7C4E14BA-C772-46BA-BC92-02A07FB8B574",
"versionEndExcluding": "23.5.2",
"versionStartIncluding": "23.0.0",
"vulnerable": true
},
{
"criteria": "cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:*",
"matchCriteriaId": "AC7DFEC6-FCA8-4319-AB18-85B0E972DD1C",
"versionEndExcluding": "25.1.1",
"versionStartIncluding": "25.0.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s 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 `\u003cType\u003e::func()` to `\u003cType as Trait\u003e::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."
},
{
"lang": "es",
"value": "soroban-sdk es un SDK de Rust para contratos Soroban. Antes de las versiones 22.0.10, 23.5.2 y 25.1.1, la macro `#[contractimpl]` contiene un error en c\u00f3mo conecta las llamadas a funciones. `#[contractimpl]` genera c\u00f3digo que utiliza llamadas al estilo `MyContract::value()` incluso cuando est\u00e1 procesando la versi\u00f3n del trait. Esto significa que si una funci\u00f3n inherente tambi\u00e9n se define con el mismo nombre, se llama a la funci\u00f3n inherente en lugar de la funci\u00f3n del trait. Esto significa que el punto de entrada exportado por Wasm llama silenciosamente a la funci\u00f3n incorrecta cuando se cumplen dos condiciones simult\u00e1neamente: Primero, se define un bloque `impl Trait for MyContract` con una o m\u00e1s funciones, con `#[contractimpl]` aplicado. Segundo, se define un bloque `impl MyContract` con una o m\u00e1s funciones con nombres id\u00e9nticos, sin `#[contractimpl]` aplicado. Si la versi\u00f3n del trait contiene comprobaciones de seguridad importantes, como verificar que el llamador est\u00e1 autorizado, que la versi\u00f3n inherente no tiene, esas comprobaciones se eluden. Cualquiera que interact\u00fae con el contrato a trav\u00e9s de su interfaz p\u00fablica llamar\u00e1 a la funci\u00f3n incorrecta. El problema est\u00e1 parcheado en las versiones de `soroban-sdk-macros` 22.0.10, 23.5.2 y 25.1.1. La correcci\u00f3n cambia la llamada generada de `::func()` a `::func()` al procesar implementaciones de traits, asegurando que Rust resuelva a la funci\u00f3n asociada del trait independientemente de si existe una funci\u00f3n inherente con el mismo nombre. Los usuarios deben actualizar a `soroban-sdk-macros` 22.0.10, 23.5.2 o 25.1.1 y recompilar sus contratos. Si la actualizaci\u00f3n no es posible de inmediato, los desarrolladores de contratos pueden evitar el problema asegur\u00e1ndose de que ninguna funci\u00f3n asociada inherente en el tipo de contrato comparta un nombre con ninguna funci\u00f3n en la implementaci\u00f3n del trait. Renombrar o eliminar la funci\u00f3n inherente en conflicto elimina la ambig\u00fcedad y hace que el c\u00f3digo generado por la macro se resuelva correctamente a la funci\u00f3n del trait."
}
],
"id": "CVE-2026-26267",
"lastModified": "2026-02-20T19:49:23.010",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"version": "3.1"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6,
"source": "security-advisories@github.com",
"type": "Secondary"
}
]
},
"published": "2026-02-19T20:25:43.530",
"references": [
{
"source": "security-advisories@github.com",
"tags": [
"Patch"
],
"url": "https://github.com/stellar/rs-soroban-sdk/commit/e92a3933e5f92dc09da3c740cf6a360d55709a2b"
},
{
"source": "security-advisories@github.com",
"tags": [
"Issue Tracking",
"Patch"
],
"url": "https://github.com/stellar/rs-soroban-sdk/pull/1729"
},
{
"source": "security-advisories@github.com",
"tags": [
"Issue Tracking",
"Patch"
],
"url": "https://github.com/stellar/rs-soroban-sdk/pull/1730"
},
{
"source": "security-advisories@github.com",
"tags": [
"Issue Tracking",
"Patch"
],
"url": "https://github.com/stellar/rs-soroban-sdk/pull/1731"
},
{
"source": "security-advisories@github.com",
"tags": [
"Exploit",
"Patch",
"Vendor Advisory"
],
"url": "https://github.com/stellar/rs-soroban-sdk/security/advisories/GHSA-4chv-4c6w-w254"
}
],
"sourceIdentifier": "security-advisories@github.com",
"vulnStatus": "Analyzed",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-670"
}
],
"source": "security-advisories@github.com",
"type": "Primary"
}
]
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…