Intel

AIKIDO-2026-796232

nostr-sdk is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-xg7c-246g-6qpv Published 3 days ago

75

High Risk

This Affects:

PYTHONnostr-sdk
0.0.1 - 0.44.5
Fixed in 0.44.6
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

nostr-sdk is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 0.44.5.

How to fix this

Upgrade the nostr-sdk package to a patched version.