soroban-sdk: `Fr` scalar field equality comparison bypasses modular reduction
Description
soroban-sdk is a Rust SDK for Soroban contracts. Prior to 22.0.11, 23.5.3, and 25.3.0, The Fr (scalar field) types for BN254 and BLS12-381 in soroban-sdk compared values using their raw U256 representation without first reducing modulo the field modulus r. This caused mathematically equal field elements to compare as not-equal when one or both values were unreduced (i.e., >= r). The vulnerability requires an attacker to supply crafted Fr values through contract inputs, and compare them directly without going through host-side arithmetic operations. Smart contracts that rely on Fr equality checks for security-critical logic could produce incorrect results. The impact depends on how the affected contract uses Fr equality comparisons, but can result in incorrect authorization decisions or validation bypasses in contracts that perform equality checks on user-supplied scalar values. This vulnerability is fixed in 22.0.11, 23.5.3, and 25.3.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
soroban-sdkcrates.io | >= 25.0.0, < 25.3.0 | 25.3.0 |
soroban-sdkcrates.io | >= 23.0.0, < 23.5.3 | 23.5.3 |
soroban-sdkcrates.io | < 22.0.11 | 22.0.11 |
Affected products
2- Range: >= 25.0.0, < 25.3.0
Patches
Vulnerability mechanics
References
8- github.com/advisories/GHSA-x2hw-px52-wp4mghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-32322ghsaADVISORY
- github.com/stellar/rs-soroban-sdk/commit/082424b30bf22ea7fb8c79f16ccd135e0ae9f3dbghsaWEB
- github.com/stellar/rs-soroban-sdk/pull/1750ghsaWEB
- github.com/stellar/rs-soroban-sdk/releases/tag/v22.0.11ghsaWEB
- github.com/stellar/rs-soroban-sdk/releases/tag/v23.5.3ghsaWEB
- github.com/stellar/rs-soroban-sdk/releases/tag/v25.3.0ghsaWEB
- github.com/stellar/rs-soroban-sdk/security/advisories/GHSA-x2hw-px52-wp4mghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.