# CVE-2021-4239: Weak encryption and denial of service in github.com/flynn/noise

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 33% of CVEs (2026-12-01)
- Published: 2022-02-15T01:57:18.000Z
- Modified: 2026-06-17T04:19:19.820Z
- Also known as: GHSA-6cr6-fmvc-vw2p, GHSA-g9mp-8g3h-3c5c, GO-2022-0425
- Weaknesses: CWE-311
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Go

## 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.

(As written by CVE List.)

## Affected

- github.com/flynn/noise: before 1.0.0
- github.com/flynn/noise (Go): before 1.0.0
- noiseprotocol noise: no versions given

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H`
- GitHub: rating Medium
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/flynn/noise/pull/44> (fix, patch, third-party-advisory, web)
- <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)

## Sources

- CVE List: [CVE-2021-4239](https://www.cve.org/CVERecord?id=CVE-2021-4239), CVE Terms of Use, modified 2025-04-14
- GitHub Advisory Database: [GHSA-6cr6-fmvc-vw2p](https://github.com/advisories/GHSA-6cr6-fmvc-vw2p), CC-BY-4.0, modified 2023-11-08
- GitHub Advisory Database: [GHSA-g9mp-8g3h-3c5c](https://github.com/advisories/GHSA-g9mp-8g3h-3c5c), CC-BY-4.0, modified 2023-11-08
- Go Vulnerability Database: [GO-2022-0425](https://pkg.go.dev/vuln/GO-2022-0425), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2021-4239](https://nvd.nist.gov/vuln/detail/CVE-2021-4239), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-4239 · Whole record: https://cve.day/CVE-2021-4239.json · Rebuilt by cve.day 2026-11-25T22:58:08.021Z
