Security Vulnerability Report
中文
CVE-2026-40093 CVSS 8.1 HIGH

CVE-2026-40093

Published: 2026-04-09 21:16:12
Last Modified: 2026-04-24 17:11:14

Description

nimiq-blockchain provides persistent block storage for Nimiq's Rust implementation. In 1.3.0 and earlier, block timestamp validation enforces that timestamp >= parent.timestamp for non-skip blocks and timestamp == parent.timestamp + MIN_PRODUCER_TIMEOUT for skip blocks, but there is no visible upper bound check against the wall clock. A malicious block-producing validator can set block timestamps arbitrarily far in the future. This directly affects reward calculations via Policy::supply_at() and batch_delay() in blockchain/src/reward.rs, inflating the monetary supply beyond the intended emission schedule.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:* - VULNERABLE
nimiq-blockchain <= 1.3.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Conceptual PoC for Nimiq Blockchain Timestamp Validation Bypass // This demonstrates the missing upper bound check in the validation logic. use std::time::{SystemTime, UNIX_EPOCH}; // Simplified structure of a Block struct Block { timestamp: u64, parent_timestamp: u64, is_skip_block: bool, } // Vulnerable Validation Logic (Conceptual) fn validate_block_vulnerable(block: &Block, current_time: u64) -> bool { let min_timeout = 1000; // Example MIN_PRODUCER_TIMEOUT // Check lower bounds as per the description if block.is_skip_block { if block.timestamp != block.parent_timestamp + min_timeout { return false; } } else { if block.timestamp < block.parent_timestamp { return false; } } // VULNERABILITY: No check against current_time (wall clock) // e.g., if block.timestamp > current_time + MAX_DRIFT { return false; } true // Block accepted even if timestamp is year 3000 } // Attack Simulation fn main() { let current_time = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs(); let parent_ts = current_time; // Malicious block with timestamp far in the future let malicious_block = Block { timestamp: current_time + 1_000_000_000, // 31 years in the future parent_timestamp: parent_ts, is_skip_block: false, }; if validate_block_vulnerable(&malicious_block, current_time) { println!("PoC: Malicious block accepted! Inflation attack triggered."); } else { println!("Block rejected."); } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40093", "sourceIdentifier": "[email protected]", "published": "2026-04-09T21:16:11.937", "lastModified": "2026-04-24T17:11:14.347", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "nimiq-blockchain provides persistent block storage for Nimiq's Rust implementation. In 1.3.0 and earlier, block timestamp validation enforces that timestamp >= parent.timestamp for non-skip blocks and timestamp == parent.timestamp + MIN_PRODUCER_TIMEOUT for skip blocks, but there is no visible upper bound check against the wall clock. A malicious block-producing validator can set block timestamps arbitrarily far in the future. This directly affects reward calculations via Policy::supply_at() and batch_delay() in blockchain/src/reward.rs, inflating the monetary supply beyond the intended emission schedule."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-1284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:*", "versionEndExcluding": "1.3.0", "matchCriteriaId": "CD0CAAD1-7626-4A4A-A6F8-9DC46FE50731"}]}]}], "references": [{"url": "https://github.com/nimiq/core-rs-albatross/security/advisories/GHSA-49xc-52mp-cc9j", "source": "[email protected]", "tags": ["Broken Link"]}]}}