Intel

AIKIDO-2026-401018

nostr-sdk is vulnerable to Improper Verification of Data Authenticity

Improper Verification of Data AuthenticityGHSA-f96q-5f6p-v7cj Published 2 days ago

75

High Risk

This Affects:

SWIFTnostr-sdk
0.40.0 - 0.44.6
Fixed in 0.44.7
Are you affected? Scan for Free

TL;DR

The relay pool inserts an event id into its signature-verification cache before the verification result is known, so a first delivery whose signature check fails still records the id as seen. A malicious or compromised relay can send an event with a valid id but an invalid signature twice: the first delivery populates the cache and the second produces a cache hit that skips verification and passes the forged event to database storage. This lets unsigned events be persisted as trusted, enabling public-key impersonation or corruption of state derived from stored events. The fix performs verification before inserting into the cache so failed attempts no longer poison it.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application connects to untrusted or compromised relays and persists received events.

Background info

nostr-sdk is vulnerable to Improper Verification of Data Authenticity in versions 0.40.0 - 0.44.6.

How to fix this

Upgrade the nostr-sdk library to the patch version.