nostr-sdk is vulnerable to Uncontrolled Resource Consumption
43
Medium Risk
The NIP-04 decryption parser splits attacker-controlled content on every ?iv= separator and collects all resulting segments before checking that the message has exactly two parts, and Base64-decodes the entire IV text before validating the required 16-byte length. A malicious sender can include many separators or an oversized IV in an encrypted direct message, forcing allocations proportional to the malformed input with additional amplification from the segment vector and Base64 output. This consumes memory and CPU in clients that attempt to decrypt messages received through a relay. The fix uses a single bounded split, rejects extra separators, and validates the encoded IV length before Base64 decoding.
You are affected if you are using a version that falls within the vulnerable range and your application decrypts NIP-04 direct messages received through a relay.
nostr-sdk is vulnerable to Uncontrolled Resource Consumption in versions 0.0.1 - 0.44.7.
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