Intel

AIKIDO-2026-580728

nostr-sdk is vulnerable to Uncontrolled Resource Consumption

GHSA-cjpx-rp36-fj8rPublished Aug 5, 2026
August 5, 2026

43

CVE Score

Medium

Uncontrolled Resource Consumption

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

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.

Who does this affect?

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.

Package

Versions

0.0.1 - 0.44.7

Fixed in 0.44.8

Background info

nostr-sdk is vulnerable to Uncontrolled Resource Consumption in versions 0.0.1 - 0.44.7.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea