CVE-2021-4239: Github.com/flynn/noise Denial of Service Vulnerability
HIGHCVE-2021-4239 is a HIGH (CVSS 7.7) denial of service vulnerability (CWE-311: Missing Encryption of Sensitive Data) affecting Github.com/flynn/noise libraries in the Go ecosystem. The issue involves noise vulnerable to denial of service. Remediation is available by upgrading affected packages to version 1.0.0.
CVE-2021-4239 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H).
How to Fix CVE-2021-4239
To remediate this vulnerability, upgrade all affected Github.com/flynn/noise dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/flynn/noise to 1.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/flynn/noise
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-4239, inspect your project dependencies for Github.com/flynn/noise:
inspect dependencies for github.com/flynn/noise
Analyze the terminal output to locate any version of Github.com/flynn/noise in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-311: Missing Encryption of Sensitive Data, where the product does not encrypt sensitive or critical information before storage or transmission. In Github.com/flynn/noise, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-4239 Affected Github.com/flynn/noise Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/flynn/noise
|
Go |
< 1.0.0
|
1.0.0
|
References
Frequently Asked Questions
What is CVE-2021-4239?
Which Github.com/flynn/noise versions are affected?
What version fixes CVE-2021-4239?
Is github.com/flynn/noise affected?
What is the CVSS score of CVE-2021-4239?
What CWE is associated with CVE-2021-4239?
How can I check Go dependencies for CVE-2021-4239?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6cr6-fmvc-vw2p",
"modified" : "2023-02-09T21:41:23Z",
"published" : "2022-12-28T00:30:23Z",
"aliases" : [ "CVE-2021-4239" ],
"summary" : "Noise vulnerable to denial of service",
"details" : "Noise is a Go implementation of the Noise Protocol Framework. 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/flynn/noise"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4239"
}, {
"type" : "WEB",
"url" : "https://github.com/flynn/noise/pull/44"
}, {
"type" : "WEB",
"url" : "https://github.com/flynn/noise/commit/2499bf1bad239a8316c32932a993642350b3afdb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/flynn/noise"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0425"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-311" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-29T01:52:11Z",
"nvd_published_at" : "2022-12-27T22:15:00Z"
}
}