Weak encryption and denial of service in github.com/flynn/noise
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-311.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| github.com/flynn/noise | github.com/flynn/noise | before 1.0.0 | 1.0.0 | Patch available | CNA |
| — | github.com/flynn/noise (Go) | before 1.0.0 | 1.0.0 | Patch available | GHSA-6cr6-fmvc-vw2p |
- github.com/flynn/noise Vendorgithub.com/flynn/noise Affected before 1.0.0 Fixed in 1.0.0 Patch available CNA
- github.com/flynn/noise (Go) Vendor— Affected before 1.0.0 Fixed in 1.0.0 Patch available GHSA-6cr6-fmvc-vw2p
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:noiseprotocol:noise:-:*:*:*:*:go:*:* | not specified by NVD | Vulnerable | Noiseprotocol |
- cpe:2.3:a:noiseprotocol:noise:-:*:*:*:*:go:*:* Versions not specified by NVD Vulnerable ·Noiseprotocol
Remediation
- Fix · CNA github.com/flynn/noise (github.com/flynn/noise) Fixed in 1.0.0
- Fix · GHSA-6cr6-fmvc-vw2p github.com/flynn/noise (Go) Fixed in 1.0.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2021-4239
- 2026-10-03 Alias added: GHSA-6cr6-fmvc-vw2p
References
Sources
- CVE-2021-4239 · CVE Program
- CVE-2021-4239 · NVD
- FIRST EPSS
- GHSA-6cr6-fmvc-vw2p · GitHub Advisory Database · CC BY 4.0
- CVE-2021-4239 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences