{"id":"UBUNTU-CVE-2021-4239","details":"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.","modified":"2026-01-20T17:16:14.307629Z","published":"2022-12-27T22:15:00Z","upstream":["CVE-2021-4239"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-4239"},{"type":"REPORT","url":"https://github.com/flynn/noise/pull/44"},{"type":"REPORT","url":"https://pkg.go.dev/vuln/GO-2022-0425"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-4239"}],"affected":[{"package":{"name":"golang-github-flynn-noise","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/golang-github-flynn-noise@1.0.0-2?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"golang-github-flynn-noise-dev","binary_version":"1.0.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-4239.json"}},{"package":{"name":"golang-github-flynn-noise","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/golang-github-flynn-noise@1.0.0-2?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"golang-github-flynn-noise-dev","binary_version":"1.0.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-4239.json"}},{"package":{"name":"golang-github-flynn-noise","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/golang-github-flynn-noise@1.1.0-1?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.0-1"],"ecosystem_specific":{"binaries":[{"binary_name":"golang-github-flynn-noise-dev","binary_version":"1.1.0-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-4239.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"Ubuntu","score":"medium"}]}