CVE-2021-4239

Weak encryption and denial of service in github.com/flynn/noise

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.

Category

7.5
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.09%
Vendor Advisory go.dev
Affected: github.com/flynn/noise github.com/flynn/noise
Published at:
Updated at:

References

Link Tags
https://github.com/flynn/noise/pull/44 third party advisory patch
https://pkg.go.dev/vuln/GO-2022-0425 patch vendor advisory

Frequently Asked Questions

What is the severity of CVE-2021-4239?
CVE-2021-4239 has been scored as a high severity vulnerability.
How to fix CVE-2021-4239?
To fix CVE-2021-4239, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-4239 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2021-4239 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-4239?
CVE-2021-4239 affects github.com/flynn/noise github.com/flynn/noise.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.