nostr-sdk is vulnerable to Denial of Service (DoS)
75
High Risk
The nostr-sdk package did not validate the length of the initialization vector decoded from the attacker-controlled ?iv= portion of a NIP-04 encrypted message. The decoded IV was converted to a 16-byte AES-CBC IV type using an asserting conversion, so an IV whose decoded length was not exactly 16 bytes caused a panic before ciphertext decryption. Applications that decrypt untrusted NIP-04 content are affected, including via NIP-47 (Nostr Wallet Connect) where malicious wallet responses reach NIP-04 decryption. A crafted event can terminate the process or disrupt message processing, causing a denial of service. The fix uses a checked conversion so invalid IV lengths return a Malformed error instead of panicking.
You are affected if you are using a version that falls within the vulnerable range and you decrypt untrusted NIP-04 content, including NIP-47 (Nostr Wallet Connect) responses or notifications.
nostr-sdk is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 0.44.5.
Upgrade the nostr-sdk package to a patched 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