Summary
flynn/noise has improper nonce handling yielding potential state DoS
The Go package github.com/flynn/noise, a Noise Protocol implementation, has two bugs in nonce handling in versions prior to v1.0.0.
Issue 1: Potential nonce overflow
If 264 (~18.4 quintillion) or more messages are encrypted with Encrypt after handshaking, the nonce counter will wrap around, causing multiple messages to be encrypted with the same key and nonce, resulting in a potentially catastrophic weakening of the security properties of the symmetric cipher.
This has been resolved in the patched version by returning ErrMaxNonce from the CipherState Encrypt and Decrypt methods before the reserved maximum nonce is reached. If this error is encountered, the program should handshake again to start with a fresh CipherState.
Issue 2: Potential denial of service via invalid ciphertext
If an attacker sends an invalid ciphertext into one peer's Decrypt, the nonce is incremented unconditionally. This causes a desync of the CipherState due to a nonce mismatch between the peers, resulting in a failure to decrypt all subsequent messages. A new handshake will be required to establish a new CipherState.
This has been resolved in the patched version by returning authentication errors from Decrypt before incrementing the nonce.
Acknowledgements
These issues were discovered during an audit of a user of this package (dnstt). Thanks to UC Berkley for commissioning the audit, and to David Fifield and Nathan Brown for their collaboration on the fixes. The fixed issues are noted in the audit as:
- UCB-02-003 Potential nonce overflow in Noise protocol
- UCB-02-006 DoS due to unconditional nonce increment
Impact
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in https://github.com/flynn/noise/pull/44, tagged as v1.0.0.
Frequently Asked Questions
- What is GHSA-G9MP-8G3H-3C5C? GHSA-G9MP-8G3H-3C5C is a medium-severity security vulnerability in github.com/flynn/noise (go), affecting versions < 1.0.0. It is fixed in 1.0.0.
- Which versions of github.com/flynn/noise are affected by GHSA-G9MP-8G3H-3C5C? github.com/flynn/noise (go) versions < 1.0.0 is affected.
- Is there a fix for GHSA-G9MP-8G3H-3C5C? Yes. GHSA-G9MP-8G3H-3C5C is fixed in 1.0.0. Upgrade to this version or later.
- Is GHSA-G9MP-8G3H-3C5C exploitable, and should I be worried? Whether GHSA-G9MP-8G3H-3C5C is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-G9MP-8G3H-3C5C is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-G9MP-8G3H-3C5C? Upgrade
github.com/flynn/noiseto 1.0.0 or later.