CVE-2026-54541: nimiq-primitives Panic Vulnerability
LOWCVE-2026-54541 is a LOW (CVSS 3.7) panic vulnerability (CWE-248: Uncaught Exception) affecting nimiq-primitives libraries in the crates.io ecosystem. The issue involves panic in trieproof::verify via child_index unwrap on equal-length keys. Remediation is available by upgrading affected packages to version 1.6.0.
CVE-2026-54541 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-54541
To remediate this vulnerability, upgrade all affected nimiq-primitives 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 nimiq-primitives to 1.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for nimiq-primitives
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-54541, inspect your project dependencies for nimiq-primitives:
inspect dependencies for nimiq-primitives
Analyze the terminal output to locate any version of nimiq-primitives in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.0), 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-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In nimiq-primitives, 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-54541 Affected nimiq-primitives Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nimiq-primitives
|
crates.io |
< 1.6.0
|
1.6.0
|
References
Frequently Asked Questions
What is CVE-2026-54541?
Which nimiq-primitives versions are affected?
What version fixes CVE-2026-54541?
Is nimiq-primitives affected?
What is the CVSS score of CVE-2026-54541?
What CWE is associated with CVE-2026-54541?
How can I check crates.io dependencies for CVE-2026-54541?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-46wq-28cx-mhw4",
"modified" : "2026-07-16T20:03:00Z",
"published" : "2026-07-16T20:03:00Z",
"aliases" : [ "CVE-2026-54541" ],
"summary" : "nimiq-primitives: Panic in TrieProof::verify via child_index unwrap on equal-length keys",
"details" : "### Impact\n\nA malicious peer acting as a state-sync source can crash a syncing node by sending a crafted `TrieChunk` whose proof contains two `TrieProofNode`s with identical keys. `TrieProof::verify()` calls `TrieProofNode::child_index()` (`primitives/src/trie/trie_proof_node.rs:94`), which unconditionally unwraps `KeyNibbles::get(self.key.len())`. Because `is_prefix_of` returns `true` for two equal keys, execution reaches `get(len)`, which returns `None`, and the `unwrap()` panics.\n\nThe panic is reached from untrusted network input (`ResponseChunk` → `commit_chunks` → `put_chunk` → `proof.verify()`) **before** any cryptographic proof verification, so the attacker does not need to produce a valid proof. Exploitation requires the attacker to be selected as the victim's sync peer while the victim is performing state sync, and the resulting crash is transient (the node restarts and re-syncs).\n\nAffected: core-rs-albatross <= 1.5.1 (`nimiq-primitives`).\n\n### Patches\n\nFixed in **1.6.0** via https://github.com/nimiq/core-rs-albatross/pull/3789 (commit `41d35ace`). `child_index` now rejects equal-length keys and returns `MerkleRadixTrieError::WrongPrefix` instead of unwrapping.\n\n### Workarounds\n\nNone other than syncing only from trusted peers. Upgrade to 1.6.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "nimiq-primitives"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/security/advisories/GHSA-46wq-28cx-mhw4"
}, {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/pull/3789"
}, {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/commit/41d35acee1b5cf3bc34ec3ddc1abbc03604e791e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nimiq/core-rs-albatross"
}, {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/releases/tag/v1.6.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-16T20:03:00Z",
"nvd_published_at" : null
}
}