CVE-2021-4239
HIGH 7.5CVSS 3.1Noise vulnerable to denial of service
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.
- Published
- 27 Dec 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security@golang.org
- NVD status
- Modified
- Weakness
- CWE-311
- Also known as
- GHSA-6cr6-fmvc-vw2pGHSA-g9mp-8g3h-3c5cGO-2022-0425
- Sources
- NVDJSONOSV GHSA-6cr6-fmvc-vw2pJSONOSV GHSA-g9mp-8g3h-3c5cJSONOSV GO-2022-0425JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 3.1 | HIGH 7.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | noiseprotocol | noisecpe:2.3:a:noiseprotocol:noise:-:*:*:*:*:go:*:* |
(no version) | |
| OSV | Go | github.com/flynn/noise | < 1.0.0 | 1.0.0 |
References
- https://github.com/flynn/noise/pull/44 · Patch, Third Party Advisory, WEB, FIX
- https://pkg.go.dev/vuln/GO-2022-0425 · Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-4239 · ADVISORY
- https://github.com/flynn/noise/commit/2499bf1bad239a8316c32932a993642350b3afdb · WEB
- https://github.com/flynn/noise · PACKAGE
- https://github.com/flynn/noise/security/advisories/GHSA-g9mp-8g3h-3c5c · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 27 Dec 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 15 Feb 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 15 Feb 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 28 Dec 2022)