{"cve":"CVE-2021-4239","nvd":{"published":"2022-12-27T22:15:12.123","modified":"2026-06-17T04:19:19.820","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5},"cwes":["CWE-311"],"references":["https://github.com/flynn/noise/pull/44","https://pkg.go.dev/vuln/GO-2022-0425","https://github.com/flynn/noise/pull/44","https://pkg.go.dev/vuln/GO-2022-0425"],"products":["noiseprotocol:noise"],"source":"nvd","synced_at":"2026-10-19T21:37:31.370122805+00:00"},"epss":{"cve":"CVE-2021-4239","score":0.00378,"percentile":0.31784,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-6cr6-fmvc-vw2p","url":"https://osv.dev/vulnerability/GHSA-6cr6-fmvc-vw2p","summary":"Noise vulnerable to denial of service","modified":"2023-11-08T04:07:06.025033Z","packages":[{"ecosystem":"Go","name":"github.com/flynn/noise","purl":"pkg:golang/github.com/flynn/noise","ranges":["<1.0.0"],"fixed":["1.0.0"]}]},{"id":"GHSA-g9mp-8g3h-3c5c","url":"https://osv.dev/vulnerability/GHSA-g9mp-8g3h-3c5c","summary":"flynn/noise has improper nonce handling yielding potential state DoS","modified":"2023-11-08T04:07:06.025033Z","packages":[{"ecosystem":"Go","name":"github.com/flynn/noise","purl":"pkg:golang/github.com/flynn/noise","ranges":["<1.0.0"],"fixed":["1.0.0"]}]},{"id":"GO-2022-0425","url":"https://osv.dev/vulnerability/GO-2022-0425","summary":"Weak encryption and denial of service in github.com/flynn/noise","modified":"2024-05-20T16:03:47Z","packages":[{"ecosystem":"Go","name":"github.com/flynn/noise","purl":"pkg:golang/github.com/flynn/noise","ranges":["<1.0.0"],"fixed":["1.0.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}