CVE-2021-4239Noiseprotocol Noise
High 7.5 No auth needed
Follow: this CVE · Noiseprotocol · Noiseprotocol Noise We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 0.4% probability of exploitation in 30 days · percentile 24
- Auth required
- No
- Published
- Dec 27, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-311
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for Noise.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/flynn/noise |
< 1.0.0 |
1.0.0 |
go get github.com/flynn/noise@v1.0.0 |
| Go | github.com/flynn/noise |
< 1.0.0 |
1.0.0 |
go get github.com/flynn/noise@v1.0.0 |
| Go | github.com/flynn/noise |
< 1.0.0 |
1.0.0 |
go get github.com/flynn/noise@v1.0.0 |
Per OSV / GitHub Advisories (GHSA-6cr6-fmvc-vw2p, GHSA-g9mp-8g3h-3c5c, GO-2022-0425). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| noiseprotocol | noise | all |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- pkg.go.dev Patch Vendor Advisory