CVE-2026-32129

Poseidon V1 variable-length input collision via implicit zero-padding

Published Mar 12, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
soroban-poseidon provides Poseidon and Poseidon2 cryptographic hash functions for Soroban smart contracts. Poseidon V1 (PoseidonSponge) accepts variable-length inputs without injective padding. When a caller provides fewer inputs than the sponge rate (inputs.len() < T - 1), unused rate positions are implicitly zero-filled. This allows trivial hash collisions: for any input vector [m1, ..., mk] hashed with a sponge of rate > k, hash([m1, ..., mk]) equals hash([m1, ..., mk, 0]) because both produce identical pre-permutation states. This affects any use of PoseidonSponge or poseidon_hash where the number of inputs is less than T - 1 (e.g., hashing 1 input with T=3). Poseidon2 (Poseidon2Sponge) is not affected.

Analysis

AI-generated

Technical impact

PoseidonV1 (PoseidonSponge) is a cryptographic hash function used in Stellar Soroban smart contracts. The implementation accepts variable-length input vectors without explicit padding. When the number of supplied inputs is less than the sponge rate (inputs.len() < T‑1), the remaining rate positions are implicitly zero‑filled. Because the pre‑permutation state is identical for [m1,…,mk] and [m1,…,mk,0] when k < T‑1, the two input vectors hash to the same digest. This creates a trivial hash collision that undermines the integrity guarantees of any hash‑based check, allowing an attacker to generate distinct inputs that produce the same hash output. The weakness is classified as CWE‑328.

Affected Systems

The vulnerability affects the Stellar rs‑soroban‑poseidon library, specifically the PoseidonV1 (PoseidonSponge) implementation. Any smart contract or application that invokes poseidon_hash or PoseidonSponge with fewer inputs than the sponge rate (for example, hashing a single input when T equals 3) is vulnerable. The Poseidon2 (Poseidon2Sponge) implementation is not impacted. The issue was addressed in release v25.0.1, which removes the implicit zero‑padding behavior.

Risk and Exploitability

CVSS score 8.7 indicates a high severity vulnerability, and the EPSS score is less than 1 %, implying a low probability of active exploitation at present. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is via a smart contract that controls the inputs to PoseidonSponge, such as a malicious transaction that calls the hash function with explicitly fewer inputs, thereby inducing a collision. While the flaw does not grant code execution, it can subvert integrity checks and potentially damage contract logic. Consequently, the risk is moderate to high, warranting prompt update of affected deployments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the stellar:rs-soroban-poseidon library to version v25.0.1 or later, which removes the implicit zero-padding behavior.
  • Ensure that all smart contracts using PoseidonSponge avoid supplying fewer inputs than the sponge rate or add explicit padding before hashing.
  • As a temporary workaround, use the Poseidon2Sponge implementation (poseidon2_hash) for new contracts until the PoseidonV1 issue is fully resolved.

Generated by OpenCVE AI on March 18, 2026 at 15:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-g2p6-hh5v-7hfm Poseidon V1 variable-length input collision via implicit zero-padding
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Stellar
Stellar rs-soroban-poseidon
Vendors & Products Stellar
Stellar rs-soroban-poseidon
Type Values Removed Values Added
Description soroban-poseidon provides Poseidon and Poseidon2 cryptographic hash functions for Soroban smart contracts. Poseidon V1 (PoseidonSponge) accepts variable-length inputs without injective padding. When a caller provides fewer inputs than the sponge rate (inputs.len() < T - 1), unused rate positions are implicitly zero-filled. This allows trivial hash collisions: for any input vector [m1, ..., mk] hashed with a sponge of rate > k, hash([m1, ..., mk]) equals hash([m1, ..., mk, 0]) because both produce identical pre-permutation states. This affects any use of PoseidonSponge or poseidon_hash where the number of inputs is less than T - 1 (e.g., hashing 1 input with T=3). Poseidon2 (Poseidon2Sponge) is not affected.
Title Poseidon V1 variable-length input collision via implicit zero-padding
Weaknesses CWE-328
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 13, 2026, 4:23 PM
Reserved
Mar 10, 2026, 10:19 PM
Status
Deferred
Published
Mar 12, 2026, 6:16 PM
Modified
Jun 17, 2026, 10:35 AM