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.
Published: 2026-03-12
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Logic Bypass via Incorrect Equality Comparison
Action: Patch
AI Analysis

Impact

The vulnerability in soroban-sdk’s Fr scalar field types causes equality checks to compare raw U256 values without reducing modulo the field modulus. Consequently, two mathematically equal field elements can evaluate as not‑equal when one or both values are unreduced (i.e., greater than or equal to the modulus). Contracts that rely on these equality checks for security‑critical decisions—such as authorization or validation—can therefore produce incorrect results, potentially allowing an attacker to bypass expected restrictions or cause erroneous behavior. This issue represents a functional logic vulnerability, not an immediate code‑execution flaw. The weakness corresponds to CWE‑697, "Incorrect Verification of Cryptographic Operation Results."

Affected Systems

The bug affects the stellar:rs-soroban-sdk package, specifically the Fr types for the BN254 and BLS12‑381 elliptic curves. Versions prior to 22.0.11, 23.5.3, and 25.3.0 are impacted. All other versions and products were not listed as affected.

Risk and Exploitability

The CVSS base score for this issue is 5.3, indicating moderate severity. EPSS indicates less than 1 % likelihood of exploitation, and the vulnerability is not listed in the CISA KEV catalog, suggesting it is not actively exploited at the time of this advisory. Exploitation requires an attacker to supply crafted Fr values through contract inputs and directly invoke the vulnerable equality check without the host performing arithmetic with reduction. Thus, any contract that uses Fr equality for critical logic is a potential target; otherwise the flaw remains a local logic issue within the contract’s execution context.

Generated by OpenCVE AI on March 19, 2026 at 15:04 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade soroban-sdk to version 22.0.11 or later (or 23.5.3/25.3.0) where the bug is fixed.
  • If updating is not immediately possible, audit contracts for equality checks on Fr values and replace them with reduced comparisons or alternative validation logic.
  • Notify developers and stakeholders about the breach of logic and monitor contract behavior for any anomalous authorization failures.

Generated by OpenCVE AI on March 19, 2026 at 15:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-x2hw-px52-wp4m rs-soroban-sdk: `Fr` scalar field equality comparison bypasses modular reduction
History

Thu, 19 Mar 2026 13:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:stellar:rs-soroban-sdk:*:*:*:*:*:rust:*:*

Sat, 14 Mar 2026 04:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 13 Mar 2026 10:00:00 +0000

Type Values Removed Values Added
First Time appeared Stellar
Stellar rs-soroban-sdk
Vendors & Products Stellar
Stellar rs-soroban-sdk

Thu, 12 Mar 2026 22:00:00 +0000

Type Values Removed Values Added
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.
Title soroban-sdk: `Fr` scalar field equality comparison bypasses modular reduction
Weaknesses CWE-697
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


Subscriptions

Stellar Rs-soroban-sdk
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-13T15:00:09.804Z

Reserved: 2026-03-11T21:16:21.661Z

Link: CVE-2026-32322

cve-icon Vulnrichment

Updated: 2026-03-13T14:59:51.934Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-13T19:54:42.610

Modified: 2026-03-19T13:37:47.243

Link: CVE-2026-32322

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-03-23T10:00:03Z

Weaknesses