Security mailing lists by PureSourceCode

RUSTSEC-2026-0219

HIGH 7.5CVSS 3.1

Remote Denial of Service via malformed NIP-04 IV

The nostr crate did not validate the length of the initialization vector
decoded from the ?iv= portion of a NIP-04 encrypted message.

The decoded IV was converted from a byte slice to the 16-byte AES-CBC IV type
using a conversion that asserts the slice length. As a result, an IV whose
decoded length was not exactly 16 bytes caused a panic before ciphertext
decryption. For example, ?iv=AAAA decodes to a three-byte IV and triggers the
panic.

Applications that decrypt untrusted NIP-04 content are affected. The issue is
also reachable through NIP-47 (Nostr Wallet Connect), where response and
notification events from a malicious or compromised wallet service are passed
to NIP-04 decryption. If the panic is not isolated, a crafted event can terminate
the application or disrupt message processing, causing a denial of service.

The issue does not affect confidentiality or integrity.

The flaw was corrected by converting the decoded IV to [u8; 16] using a
checked conversion. Invalid IV lengths now return a Malformed error instead of
panicking.

Credit

Discovered and responsibly disclosed by Muhammed Shekho (mhd-shekho.com).

Published
26 Jul 2026
Last modified
1 Aug 2026
Also known as
GHSA-xg7c-246g-6qpv
Sources
OSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV RustSec CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io nostr >= 0.0.0-0, < 0.44.6; >= 0.45.0-alpha.1, < 0.45.0-alpha.6 0.44.6, 0.45.0-alpha.6

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Jul 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.