RUSTSEC-2026-0216 Remote Denial of Service via malformed NIP‑44 v2 payload

Not scored Published

A remote attacker with a conversation key can cause a denial of service in the nostr crate by sending a malformed NIP-44 v2 payload that triggers a panic.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is RUSTSEC-2026-0216?

RUSTSEC-2026-0216 is a denial of service vulnerability in nostr, published on 25 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

The NIP-44 v2 decryption path in the nostr crate contains a reachable panic when processing a short or empty ciphertext. After the HMAC check passes and the ciphertext is decrypted via ChaCha20, the code reads a 2‑byte unpadded‑length prefix via buffer[0..2] without first verifying that the decrypted buffer contains at least 2 bytes. A malicious sender who holds the symmetric conversation key (e.g., a direct‑message sender) can craft a payload that produces a 0 or 1‑byte decrypted buffer, causing an index‑out‑of‑bounds panic. This can be triggered remotely through any relay that delivers the crafted event to the victim's client, resulting in a denial of service. No key material, plaintext, or memory corruption occurs.

The vulnerability is present in all versions from 0.26.0 up to 0.44.4 (inclusive) and in the alpha releases 0.45.0‑alpha.1 through 0.45.0‑alpha.4. Versions 0.44.5 and 0.45.0‑alpha.5 contain the fix.

Credit

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

Which versions are affected by RUSTSEC-2026-0216?

1 open source package ship an affected version, including nostr.

PackageAffectedFixed in
nostr crates.ioFrom 0.0.0-00.44.5, 0.45.0-alpha.5

How do I fix RUSTSEC-2026-0216?

Upgrade nostr to a fixed version for your release line: 0.44.5 or 0.45.0-alpha.5.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is RUSTSEC-2026-0216 being exploited?

There is no known exploitation of RUSTSEC-2026-0216 in the wild and no public exploit code.

Sources

Also known as GHSA-hrqp-8w79-gwgw.

Is RUSTSEC-2026-0216 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free