{"id":"CVE-2021-4239","published":"2022-12-27T21:13:53Z","modified":"2025-04-14T16:59:43Z","title":"Weak encryption and denial of service in github.com/flynn/noise","vendor":"github.com/flynn/noise","product":"github.com/flynn/noise","tier":"tail","description":{"text":"The Noise protocol implementation suffers from weakened cryptographic security after encrypting 2^64 messages, and a potential denial of service attack. After 2^64 (~18.4 quintillion) messages are encrypted with the Encrypt function, the nonce counter will wrap around, causing multiple messages to be encrypted with the same key and nonce. In a separate issue, the Decrypt function increments the nonce state even when it fails to decrypt a message. If an attacker can provide an invalid input to the Decrypt function, this will cause the nonce state to desynchronize between the peers, resulting in a failure to encrypt all subsequent messages.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00378,"percentile":0.32601,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/flynn/noise/pull/44","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2022-0425","tags":[]}],"priority":{"score":11.8,"factors":[{"name":"EPSS percentile","points":6.52},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"github-com-flynn-noise","affectedVersions":[{"vendor":"github.com/flynn/noise","product":"github.com/flynn/noise","versions":["< 1.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-14T16:59:11.062582Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/flynn/noise","vulnerableRanges":["<1.0.0"],"patched":["1.0.0"],"from":["GHSA-6cr6-fmvc-vw2p","GO-2022-0425"],"provenance":"source"}],"summary":{"text":"The github.com/flynn/noise Go implementation of the Noise protocol has two flaws in its nonce handling: the Encrypt function's nonce counter wraps around after 2^64 messages, reusing key and nonce pairs, and the Decrypt function advances the nonce even when decryption fails. An attacker with network access and no authentication or user interaction can send invalid input to Decrypt, desynchronising the nonce state between peers so that subsequent messages cannot be encrypted correctly, which causes a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:53:54Z"},"euvd":{"id":"EUVD-2022-7529","exploited":false,"provenance":"source"}}