{"api_version":"1","generated_at":"2026-07-23T11:12:35+00:00","cve":"CVE-2021-4239","urls":{"html":"https://cve.report/CVE-2021-4239","api":"https://cve.report/api/cve/CVE-2021-4239.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-4239","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-4239"},"summary":{"title":"CVE-2021-4239","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.","state":"PUBLIC","assigner":"security@golang.org","published_at":"2022-12-27 22:15:00","updated_at":"2023-01-06 01:30:00"},"problem_types":["CWE-311"],"metrics":[],"references":[{"url":"https://pkg.go.dev/vuln/GO-2022-0425","name":"https://pkg.go.dev/vuln/GO-2022-0425","refsource":"MISC","tags":[],"title":"GO-2022-0425 - Go Packages","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/flynn/noise/pull/44","name":"https://github.com/flynn/noise/pull/44","refsource":"MISC","tags":[],"title":"Fix nonce handling by titanous · Pull Request #44 · flynn/noise · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-4239","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4239","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"4239","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"noiseprotocol","cpe5":"noise","cpe6":"-","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"go","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2021-4239","ASSIGNER":"security@golang.org","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE 400: Uncontrolled Resource Consumption"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"github.com/flynn/noise","product":{"product_data":[{"product_name":"github.com/flynn/noise","version":{"version_data":[{"version_affected":"<","version_name":"0","version_value":"1.0.0"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/flynn/noise/pull/44","refsource":"MISC","name":"https://github.com/flynn/noise/pull/44"},{"url":"https://pkg.go.dev/vuln/GO-2022-0425","refsource":"MISC","name":"https://pkg.go.dev/vuln/GO-2022-0425"}]}},"nvd":{"publishedDate":"2022-12-27 22:15:00","lastModifiedDate":"2023-01-06 01:30:00","problem_types":["CWE-311"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:noiseprotocol:noise:-:*:*:*:*:go:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}