CVE-2026-32129: Soroban poseidon Poseidon V1 Variable-length Input Collision Vulnerability
HIGHCVE-2026-32129 is a HIGH poseidon v1 variable-length input collision vulnerability (CWE-328: Use of Weak Hash) affecting Soroban poseidon libraries in the crates.io ecosystem. The issue involves poseidon v1 variable-length input collision via implicit zero-padding. Remediation is available by upgrading affected packages to version 25.0.1.
CVE-2026-32129 at a Glance
How to Fix CVE-2026-32129
To remediate this vulnerability, upgrade all affected Soroban poseidon dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade soroban-poseidon to 25.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for soroban-poseidon
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-32129, inspect your project dependencies for Soroban poseidon:
inspect dependencies for soroban-poseidon
Analyze the terminal output to locate any version of Soroban poseidon in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.0.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-328: Use of Weak Hash, where the product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack). In Soroban poseidon, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-32129 Affected Soroban poseidon Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
soroban-poseidon
|
crates.io |
< 25.0.1
|
25.0.1
|
References
Frequently Asked Questions
What is CVE-2026-32129?
Which Soroban poseidon versions are affected?
What version fixes CVE-2026-32129?
Is soroban-poseidon affected?
What CWE is associated with CVE-2026-32129?
How can I check crates.io dependencies for CVE-2026-32129?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g2p6-hh5v-7hfm",
"modified" : "2026-03-13T15:40:31Z",
"published" : "2026-03-13T15:40:31Z",
"aliases" : [ "CVE-2026-32129" ],
"summary" : "Poseidon V1 variable-length input collision via implicit zero-padding",
"details" : "## Impact\n\nPoseidon 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.\n\nThis 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`).\n\nPoseidon2 (`Poseidon2Sponge`) is **not affected** — it encodes the input length in the capacity element (`IV = input_len << 64`), making different-length inputs produce distinct states.\n\n## Patches\n\nFixed by enforcing `inputs.len() == RATE` in `PoseidonSponge::compute_hash`, matching circom's invariant that `nInputs` always equals `T - 1`. Users should upgrade to the next release containing this fix.\n\n## Workarounds\n\nIf upgrading is not immediately possible:\n\n- Ensure callers **always** use `T = inputs.len() + 1` (full-rate), which is how circom uses Poseidon. For example, to hash 2 inputs, use `T=3`; to hash 1 input, use `T=2`. Never use a sponge with more rate capacity than the number of inputs.\n- Alternatively, migrate to `Poseidon2Sponge`, which is safe for variable-length inputs due to its length-encoding IV.\n\n## References\n- [circom Poseidon implementation](https://github.com/iden3/circomlib/blob/master/circuits/poseidon.circom) — reference implementation where `nInputs` determines `T`\n- [Poseidon paper](https://eprint.iacr.org/2019/458) — Section 4 discusses sponge construction and padding requirements",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "soroban-poseidon"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "25.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-soroban-poseidon/security/advisories/GHSA-g2p6-hh5v-7hfm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32129"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-soroban-poseidon/pull/10"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-soroban-poseidon/commit/ceb20d3593fc4a8a951a7e99d8fa2344f8250a8c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/stellar/rs-soroban-poseidon"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-soroban-poseidon/releases/tag/v25.0.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-328" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T15:40:31Z",
"nvd_published_at" : "2026-03-12T18:16:25Z"
}
}