{"id":"GHSA-hrqp-8w79-gwgw","aliases":["RUSTSEC-2026-0216"],"status":"published","title":"Remote Denial of Service via malformed NIP‑44 v2 payload","description":"The NIP-44 v2 decryption path in the `nostr` crate contains a reachable panic\nwhen processing a short or empty ciphertext. After the HMAC check passes and the\nciphertext is decrypted via ChaCha20, the code reads a 2‑byte unpadded‑length\nprefix via `buffer[0..2]` without first verifying that the decrypted buffer\ncontains at least 2 bytes. A malicious sender who holds the symmetric\nconversation key (e.g., a direct‑message sender) can craft a payload that\nproduces a 0 or 1‑byte decrypted buffer, causing an index‑out‑of‑bounds panic.\nThis can be triggered remotely through any relay that delivers the crafted\nevent to the victim's client, resulting in a denial of service. No key material,\nplaintext, or memory corruption occurs.\n\nThe vulnerability is present in all versions from `0.26.0` up to `0.44.4`\n(inclusive) and in the alpha releases `0.45.0‑alpha.1` through `0.45.0‑alpha.4`.\nVersions `0.44.5` and `0.45.0‑alpha.5` contain the fix.\n\n## Credit\n\nDiscovered and responsibly disclosed by **Muhammed Shekho** ([mhd-shekho.com](https://mhd-shekho.com)).","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","from":"osv"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-07-25T12:00:00Z","modified":"2026-08-01T11:45:04Z","fixes":[{"ecosystem":"crates.io","package":"nostr","fixed_in":["0.44.5","0.45.0-alpha.5"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"crates.io","package":"nostr","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.44.5"},{"introduced":"0.45.0-alpha.1"},{"fixed":"0.45.0-alpha.5"}]}]}],"references":[{"url":"https://crates.io/crates/nostr","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0216.html","tags":["advisory"]},{"url":"https://github.com/nostrdevkit/nostr/commit/73bdd677b872641d57a2ebcc5afc23ee0e5f0d2d","tags":["web"]}],"sources":{"osv":[{"id":"RUSTSEC-2026-0216","title":"Remote Denial of Service via malformed NIP‑44 v2 payload","description":"The NIP-44 v2 decryption path in the `nostr` crate contains a reachable panic\nwhen processing a short or empty ciphertext. After the HMAC check passes and the\nciphertext is decrypted via ChaCha20, the code reads a 2‑byte unpadded‑length\nprefix via `buffer[0..2]` without first verifying that the decrypted buffer\ncontains at least 2 bytes. A malicious sender who holds the symmetric\nconversation key (e.g., a direct‑message sender) can craft a payload that\nproduces a 0 or 1‑byte decrypted buffer, causing an index‑out‑of‑bounds panic.\nThis can be triggered remotely through any relay that delivers the crafted\nevent to the victim's client, resulting in a denial of service. No key material,\nplaintext, or memory corruption occurs.\n\nThe vulnerability is present in all versions from `0.26.0` up to `0.44.4`\n(inclusive) and in the alpha releases `0.45.0‑alpha.1` through `0.45.0‑alpha.4`.\nVersions `0.44.5` and `0.45.0‑alpha.5` contain the fix.\n\n## Credit\n\nDiscovered and responsibly disclosed by **Muhammed Shekho** ([mhd-shekho.com](https://mhd-shekho.com)).","status":"published","published":"2026-07-25T12:00:00Z","modified":"2026-08-01T11:45:04.391536905Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:40.430679Z"}]}}
