Email me

Rust advisories / nostr

Vulnerability HighRUSTSEC-2026-0216 · nostr

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

Short answerA security vulnerability in the nostr crate: Remote Denial of Service via malformed NIP‑44 v2 payload. High severity (CVSS 7.5). Fixed in 0.44.5, 0.45.0-alpha.5: update to a fixed version.

Cratenostr
TypeVulnerability (denial-of-service)
Affected versionsBefore 0.44.5; from 0.45.0-alpha.1 before 0.45.0-alpha.5.
Fixed in0.44.5, 0.45.0-alpha.5
SeverityHigh, CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published2026-07-25
Last changed2026-08-01
Also known asGHSA-hrqp-8w79-gwgw
Affected functionsnostr::nips::nip44::decrypt, nostr::nips::nip44::decrypt_to_bytes, nostr::nips::nip44::v2::decrypt_to_bytes

What to do

  1. See which version you have: cargo tree -i nostr (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p nostr. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example nostr = "0.45.0-alpha.5") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

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).

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for nostr

Full security history of nostr

Up next

Same cratenostr: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ