{"id":"RUSTSEC-2026-0219","revision":"b7f491f59ca44974a9b2aa930804a9e3","records":[{"revision":"b7f491f59ca44974a9b2aa930804a9e3","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0219","aliases":["GHSA-xg7c-246g-6qpv"],"title":"Remote Denial of Service via malformed NIP-04 IV","description":"The `nostr` crate did not validate the length of the initialization vector\ndecoded from the `?iv=` portion of a NIP-04 encrypted message.\n\nThe decoded IV was converted from a byte slice to the 16-byte AES-CBC IV type\nusing a conversion that asserts the slice length. As a result, an IV whose\ndecoded length was not exactly 16 bytes caused a panic before ciphertext\ndecryption. For example, `?iv=AAAA` decodes to a three-byte IV and triggers the\npanic.\n\nApplications that decrypt untrusted NIP-04 content are affected. The issue is\nalso reachable through NIP-47 (Nostr Wallet Connect), where response and\nnotification events from a malicious or compromised wallet service are passed\nto NIP-04 decryption. If the panic is not isolated, a crafted event can terminate\nthe application or disrupt message processing, causing a denial of service.\n\nThe issue does not affect confidentiality or integrity.\n\nThe flaw was corrected by converting the decoded IV to `[u8; 16]` using a\nchecked conversion. Invalid IV lengths now return a `Malformed` error instead of\npanicking.\n\n## Credit\n\nDiscovered and responsibly disclosed by **Muhammed Shekho** ([mhd-shekho.com](https://mhd-shekho.com)).","state":0,"publishedAt":"2026-07-26T12:00:00+00:00","modifiedAt":"2026-08-01T11:45:04.7852792+00:00","affected":[{"ecosystem":"crates.io","name":"nostr","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.44.6"},{"kind":"introduced","version":"0.45.0-alpha.1"},{"kind":"fixed","version":"0.45.0-alpha.6"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null}],"references":["https://crates.io/crates/nostr","https://rustsec.org/advisories/RUSTSEC-2026-0219.html","https://github.com/nostrdevkit/nostr/commit/b24619346f666d08ef7fefe27f033b8bc871697f"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0219","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0219","identifiers":["RUSTSEC-2026-0219","GHSA-xg7c-246g-6qpv"]},"retained":false,"historicalAffected":[]}],"coverage":[]}