CVE-2023-46740: Github.com/cubefs/cubefs Insecure Random String Generator Used Vulnerability

HIGH
Advisory Identifier: GHSA-4248-p65p-hcrm
CVSS 6.5
CWE-330
Published
Advisory Summary

CVE-2023-46740 is a HIGH (CVSS 6.5) insecure random string generator used vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Github.com/cubefs/cubefs libraries in the Go ecosystem. The issue involves insecure random string generator used for sensitive data. Remediation is available by upgrading affected packages to version 3.3.1.

CVE-2023-46740 at a Glance

CVE Identifier CVE-2023-46740
GHSA Identifier GHSA-4248-p65p-hcrm
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-330: Use of Insufficiently Random Values
Affected Product Github.com/cubefs/cubefs
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:C/C:L/I:L/A:L).

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

How to Fix CVE-2023-46740

To remediate this vulnerability, upgrade all affected Github.com/cubefs/cubefs 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/cubefs/cubefs fixed: 3.3.1
Upgrade github.com/cubefs/cubefs to 3.3.1
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/cubefs/cubefs

How to Check if You Are Affected

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

inspect dependencies for github.com/cubefs/cubefs

Analyze the terminal output to locate any version of Github.com/cubefs/cubefs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.1), 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-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Github.com/cubefs/cubefs, 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

CubeFS used an insecure random string generator to generate user-specific, sensitive keys used to authenticate users in a CubeFS deployment. This could allow an attacker to predict and/or guess the generated string and impersonate a user thereby obtaining higher privileges. When CubeFS creates new users, it creates a piece of sensitive information for the user called the “accessKey”. To create the "accesKey", CubeFS uses an insecure string generator which makes it easy to guess and thereby impersonate the created user. An attacker could leverage the predictable random string generator and guess a users access key and impersonate the user to obtain higher privileges. There is no evidence of this vulnerability being exploited in the wild. It was found during a security audit carried out by [Ada Logics](https://adalogics.com/) in collaboration with [OSTIF](https://ostif.org/) and the [CNCF](https://www.cncf.io/). The issue has been fixed in v3.3.1. There is no other mitigation than to upgrade.

CVE-2023-46740 Affected Github.com/cubefs/cubefs Versions

1 component(s)
Fixed Versions:
3.3.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cubefs/cubefs
Go
< 3.3.1
3.3.1

References

Frequently Asked Questions

What is CVE-2023-46740?
CVE-2023-46740 is a security vulnerability in Github.com/cubefs/cubefs involving Insecure random string generator used for sensitive data under CWE-330: Use of Insufficiently Random Values.
Which Github.com/cubefs/cubefs versions are affected?
Affected versions include releases prior to 3.3.1 across affected packages: github.com/cubefs/cubefs.
What version fixes CVE-2023-46740?
Upgrading to 3.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cubefs/cubefs affected?
Yes, github.com/cubefs/cubefs is affected in releases prior to 3.3.1. Upgrade your dependency to 3.3.1 or later.
What is the CVSS score of CVE-2023-46740?
CVE-2023-46740 has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2023-46740?
CVE-2023-46740 is classified under CWE-330: Use of Insufficiently Random Values (The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.).
How can I check Go dependencies for CVE-2023-46740?
Run the dependency tree command: 'inspect dependencies for github.com/cubefs/cubefs'. 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-4248-p65p-hcrm",
  "modified" : "2024-11-18T16:26:34Z",
  "published" : "2024-01-03T16:14:08Z",
  "aliases" : [ "CVE-2023-46740" ],
  "summary" : "Insecure random string generator used for sensitive data",
  "details" : "CubeFS used an insecure random string generator to generate user-specific, sensitive keys used to authenticate users in a CubeFS deployment. This could allow an attacker to predict and/or guess the generated string and impersonate a user thereby obtaining higher privileges.\n\nWhen CubeFS creates new users, it creates a piece of sensitive information for the user called the “accessKey”. To create the \"accesKey\", CubeFS uses an insecure string generator which makes it easy to guess and thereby impersonate the created user. \n\nAn attacker could leverage the predictable random string generator and guess a users access key and impersonate the user to obtain higher privileges.\n\nThere is no evidence of this vulnerability being exploited in the wild. It was found during a security audit carried out by [Ada Logics](https://adalogics.com/) in collaboration with [OSTIF](https://ostif.org/) and the [CNCF](https://www.cncf.io/).\n\nThe issue has been fixed in v3.3.1. There is no other mitigation than to upgrade.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cubefs/cubefs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cubefs/cubefs/security/advisories/GHSA-4248-p65p-hcrm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46740"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cubefs/cubefs/commit/8555c6402794cabdf2cc025c8bea1576122c07ba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cubefs/cubefs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-330" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-03T16:14:08Z",
    "nvd_published_at" : "2024-01-03T17:15:10Z"
  }
}