{"id":"GHSA-5rg2-xv9j-gv5p","revision":"69f2eb83afc946d392dd91a922bcc07f","records":[{"revision":"69f2eb83afc946d392dd91a922bcc07f","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-5rg2-xv9j-gv5p","aliases":["CVE-2026-54542"],"title":"nimiq-primitives: Out-of-bounds panic in KeyNibbles::Add from oversized child suffix in a deserialized proof","description":"### 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.","state":0,"publishedAt":"2026-07-16T20:03:25+00:00","modifiedAt":"2026-07-16T20:26:44.362618+00:00","affected":[{"ecosystem":"crates.io","name":"nimiq-primitives","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.6.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/nimiq/core-rs-albatross/security/advisories/GHSA-5rg2-xv9j-gv5p","https://github.com/nimiq/core-rs-albatross/pull/3790","https://github.com/nimiq/core-rs-albatross/commit/eabfc3e21731b0628c3f933163a0f1e1864217bf","https://github.com/nimiq/core-rs-albatross","https://github.com/nimiq/core-rs-albatross/releases/tag/v1.6.0"],"sourceUrl":"https://github.com/advisories/GHSA-5rg2-xv9j-gv5p","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-5rg2-xv9j-gv5p","identifiers":["GHSA-5rg2-xv9j-gv5p","CVE-2026-54542"]},"retained":false,"historicalAffected":[]}],"coverage":[]}