CVE-2023-1732: Github.com/cloudflare/circl Improper Random Reading Vulnerability

MODERATE
Advisory Identifier: GHSA-2q89-485c-9j2x
CVSS 5.3
CWE-755 CWE-20
Published
Advisory Summary

CVE-2023-1732 is a MODERATE (CVSS 5.3) improper random reading vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Github.com/cloudflare/circl libraries in the Go ecosystem. The issue involves improper random reading in circl. Remediation is available by upgrading affected packages to version 1.3.3.

CVE-2023-1732 at a Glance

CVE Identifier CVE-2023-1732
GHSA Identifier GHSA-2q89-485c-9j2x
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Github.com/cloudflare/circl
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-1732

To remediate this vulnerability, upgrade all affected Github.com/cloudflare/circl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cloudflare/circl fixed: 1.3.3
Upgrade github.com/cloudflare/circl to 1.3.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cloudflare/circl

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-1732, inspect your project dependencies for Github.com/cloudflare/circl:

inspect dependencies for github.com/cloudflare/circl

Analyze the terminal output to locate any version of Github.com/cloudflare/circl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.3), 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-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Github.com/cloudflare/circl, 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

### Impact When sampling randomness for a shared secret, the implementation of Kyber and FrodoKEM, did not check whether `crypto/rand.Read()` returns an error. In rare deployment cases (error thrown by the `Read()` function), this could lead to a predictable shared secret. The tkn20 and blindrsa components did not check whether enough randomness was returned from the user provided randomness source. Typically the user provides `crypto/rand.Reader`, which in the vast majority of cases will always return the right number random bytes. In the cases where it does not, or the user provides a source that does not, the blinding for blindrsa is weak and integrity of the plaintext is not ensured in tkn20. ### Patches The fix was introduced in CIRCL v. 1.3.3

CVE-2023-1732 Affected Github.com/cloudflare/circl Versions

1 component(s)
Fixed Versions:
1.3.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudflare/circl
Go
< 1.3.3
1.3.3

References

Frequently Asked Questions

What is CVE-2023-1732?
CVE-2023-1732 is a security vulnerability in Github.com/cloudflare/circl involving Improper random reading in CIRCL under CWE-755: Improper Handling of Exceptional Conditions.
Which Github.com/cloudflare/circl versions are affected?
Affected versions include releases prior to 1.3.3 across affected packages: github.com/cloudflare/circl.
What version fixes CVE-2023-1732?
Upgrading to 1.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudflare/circl affected?
Yes, github.com/cloudflare/circl is affected in releases prior to 1.3.3. Upgrade your dependency to 1.3.3 or later.
What is the CVSS score of CVE-2023-1732?
CVE-2023-1732 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2023-1732?
CVE-2023-1732 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check Go dependencies for CVE-2023-1732?
Run the dependency tree command: 'inspect dependencies for github.com/cloudflare/circl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2q89-485c-9j2x",
  "modified" : "2023-05-24T18:31:42Z",
  "published" : "2023-05-11T20:40:54Z",
  "aliases" : [ "CVE-2023-1732" ],
  "summary" : "Improper random reading in CIRCL",
  "details" : "### Impact\nWhen sampling randomness for a shared secret, the implementation of Kyber and FrodoKEM, did not check whether `crypto/rand.Read()` returns an error. In rare deployment cases (error thrown by the `Read()` function), this could lead to a predictable shared secret.\n\nThe tkn20 and blindrsa components did not check whether enough randomness was returned from the user provided randomness source. Typically the user provides `crypto/rand.Reader`, which in the vast majority of cases will always return the right number random bytes. In the cases where it does not, or the user provides a source that does not, the blinding for blindrsa is weak and integrity of the plaintext is not ensured in tkn20.\n\n\n### Patches\nThe fix was introduced in CIRCL v. 1.3.3\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudflare/circl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/circl/security/advisories/GHSA-2q89-485c-9j2x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-1732"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/circl/commit/ff8d91225f8954b4970b6d6382d2e4c78f4a4cf8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/circl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/circl/releases/tag/v1.3.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-755" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-11T20:40:54Z",
    "nvd_published_at" : "2023-05-10T12:15:10Z"
  }
}