nostr-sdk is vulnerable to Denial of Service (DoS)
75
High Risk
The NIP-44 v2 decryption path in the nostr-sdk package reads a two-byte unpadded-length prefix from the decrypted buffer via unchecked slicing without verifying that the buffer holds at least two bytes. After a valid HMAC check and ChaCha20 decryption, a short or empty ciphertext can yield a 0- or 1-byte buffer and trigger an index-out-of-bounds panic. A sender who holds the conversation key can craft such a payload and deliver it through any relay, denying service to clients that decrypt the event. The fix enforces a minimum NIP-44 v2 payload size and replaces unchecked indexing with bounds-checked reads that return an error.
You are affected if you are using a version that falls within the vulnerable range and your application decrypts NIP-44 v2 payloads (for example via decrypt or decrypt_to_bytes) from untrusted senders.
nostr-sdk is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 0.44.4.
Upgrade the nostr-sdk 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