CVE-2026-54542: nimiq-primitives Out-of-bounds Panic Vulnerability
LOWCVE-2026-54542 is a LOW (CVSS 3.7) out-of-bounds panic vulnerability (CWE-125: Out-of-bounds Read) affecting nimiq-primitives libraries in the crates.io ecosystem. The issue involves out-of-bounds panic in keynibbles::add from oversized child suffix in a deserialized proof. Remediation is available by upgrading affected packages to version 1.6.0.
CVE-2026-54542 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-54542
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-54542, 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-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. 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-54542 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-54542?
Which nimiq-primitives versions are affected?
What version fixes CVE-2026-54542?
Is nimiq-primitives affected?
What is the CVSS score of CVE-2026-54542?
What CWE is associated with CVE-2026-54542?
How can I check crates.io dependencies for CVE-2026-54542?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5rg2-xv9j-gv5p",
"modified" : "2026-07-16T20:03:25Z",
"published" : "2026-07-16T20:03:25Z",
"aliases" : [ "CVE-2026-54542" ],
"summary" : "nimiq-primitives: Out-of-bounds panic in KeyNibbles::Add from oversized child suffix in a deserialized proof",
"details" : "### Impact\n\nA malicious peer acting as a state-sync source can crash a syncing node with a crafted `TrieChunk` whose proof contains a `TrieNodeChild` whose `suffix`, when concatenated with the parent key via `KeyNibbles::Add`, exceeds the fixed 63-byte backing array. `Add` (`primitives/src/key_nibbles.rs:332` / `:341`) indexes `bytes[self.bytes_len()..self.bytes_len() + other.bytes_len()]` with no combined-length check, causing an out-of-bounds slice panic (both the even- and odd-length branches).\n\n`KeyNibbles` deserialization validates only the individual `length <= 126`, not the combined parent + suffix length. The panic occurs at `put_chunk` → `child.key()` → `is_stump()` → `+`, i.e. **before** `proof.verify()`, so no valid proof is required. As with the related `child_index` issue, exploitation requires being the victim's sync peer during 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/3790 (commit `eabfc3e2`), which guards key-nibble concatenation against exceeding the maximum length instead of indexing out of bounds.\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-5rg2-xv9j-gv5p"
}, {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/pull/3790"
}, {
"type" : "WEB",
"url" : "https://github.com/nimiq/core-rs-albatross/commit/eabfc3e21731b0628c3f933163a0f1e1864217bf"
}, {
"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-125" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-16T20:03:25Z",
"nvd_published_at" : null
}
}