nostr-sdk is vulnerable to Uncontrolled Resource Consumption
75
High Risk
The NIP-44 decryption entry point Base64-decodes the complete payload before checking its version or enforcing a size limit, and for v2 payloads authenticates the decoded buffer with HMAC even when it far exceeds the maximum supported payload. A malicious relay or event author can deliver an oversized value that forces allocation and Base64 and HMAC work proportional to its size before authentication fails, without knowledge of the conversation key. Repeated payloads can exhaust memory or CPU and make the receiving application unavailable. The fix reads the version prefix first, bounds the payload to the largest value the current v2 encoder can emit, and rejects oversized encoded and decoded payloads before full allocation or HMAC processing.
You are affected if you are using a version that falls within the vulnerable range and your application decrypts NIP-44 content received from relays or event authors.
nostr-sdk is vulnerable to Uncontrolled Resource Consumption in versions 0.0.1 - 0.44.7.
Upgrade the org.rust-nostr:nostr-sdk, org.rust-nostr:nostr-sdk-jvm, or org.rust-nostr:nostr-sdk-kmp library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant